I used @ViewChildren component:
@ViewChildren("MyTest2Component") public myTest2Component: QueryList<MyTest2Component>
public ngAfterViewInit() {
this.myTest2Component.changes.subscribe((comps: QueryList <MyTest2Component>) =>
{
console.log(comps.first.data); // data is async, here is undefind
});
}
but when trying to call async variable data, return undefind
What can I do to solve this problem?