0

How to call a function after *ngFor finished loading elements in the view from an array that is loaded from a rest api ? Putting it in the ngAfterViewInit() hook won't do as adding a breakpoint there shows that the *ngFor didn't load anything yet when the breakpoint is hit.

Wicelo
  • 2,358
  • 2
  • 28
  • 44
  • do you have image inside your loop elements ? if yes, your callback worry about this loading ? – Yanis-git Oct 31 '18 at 07:04
  • @Yanis-git I have images, I don't mind about them loading later. – Wicelo Oct 31 '18 at 07:16
  • alright, so @bambam linked topic should do the expected job :) if not don't hesitate to tell us and updating your post, we will do our best to find solution – Yanis-git Oct 31 '18 at 07:18
  • @Yanis-git it's true that it works, I didn't understand the syntax of the ViewChildren decorator but it worked anyway thanks – Wicelo Oct 31 '18 at 07:21

0 Answers0