Guest User

Untitled

a guest
Feb 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <div>
  2. <ng-content></ng-content>
  3. </div>
  4.  
  5. <ng-content></ng-content>
  6.  
  7. @ContentChildren(forwardRef(() => Item), { descendants: true }) Items: QueryList<Item>;
  8. ngAfterContentInit(): void {
  9. console.log(this.Items); // issue is here. query List is empty
  10. // how to access items
  11. }
  12.  
  13. <container-list>
  14. <ng-content></ng-content>
  15. </container-list>
  16.  
  17. <container>
  18. <item *ngFor="let item of items">{{item.name}}</item>
  19. </container>
Add Comment
Please, Sign In to add comment