This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- person1 is an object of type Person --> | |
<array-coercion | |
[strings]="'array item 1'" | |
[persons]="person1" | |
></array-coercion> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- person1 & person2 are objects of type Person --> | |
<array-coercion | |
[strings]="['array item 1', 'array item 2']" | |
[persons]="[person1, person2]" | |
></array-coercion> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Input } from '@angular/core'; | |
import { Person } from './person.interface'; | |
@Component({ | |
selector: 'array-coercion', | |
template: `...` | |
}) | |
export class ArrayCoercionComponent { | |
@Input() strings: Array<string>; | |
@Input() persons: Array<Person>; |
NewerOlder