Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div>
- <ng-content></ng-content>
- </div>
- <ng-content></ng-content>
- @ContentChildren(forwardRef(() => Item), { descendants: true }) Items: QueryList<Item>;
- ngAfterContentInit(): void {
- console.log(this.Items); // issue is here. query List is empty
- // how to access items
- }
- <container-list>
- <ng-content></ng-content>
- </container-list>
- <container>
- <item *ngFor="let item of items">{{item.name}}</item>
- </container>
Add Comment
Please, Sign In to add comment