I want to update the UI of a component after it's fully rendered. Because it's rendering elements in a for, my understanding is that I need to use a subscription to check for the elements to first be created before I interact with the UI.
Based on examples I've read, this is what I came up with. However, nothing happens in that my console.log statement inside my subscription never fires. No errors. It's as if my subscription doesn't see any changes. Is there anything obviously missing from my logic here?
template markup:
<ng-container *ngFor="let item of items; let i = index;">
<input *ngIf="..." #inputItem>
Angular (5):
@ViewChildren('inputItem', {read: ViewContainerRef }) inputItems: QueryList<ViewContainerRef>;
ngAfterViewInit(): any {
this.inputItems.changes.subscribe(() => {
console.log('items created');
});
}