I have two components: list and detail
In list component I want to render multiple detail components.
list.component.ts
@Component({
selector: 'detail',
templateUrl: './detail.component.html'
})
export class DetailComponent {
@ViewChild('details') details;
public items = {
// ...
}
}
list.component.html
<detail *ngFor="let item of items" #details></detail>
Notice the #details tempalte reference variable. I want to access all of the detail components. It is possible to make the #details variable an array ?