As the code provided bellow. I tried to select a dynamic element generated by ngIf but failed.
I used two ways in total.
Is not exactly the best but I deal with a similar situation using [ngClass] instead *ngIf. Just create a class with "display: none" and hide the elements when needed. The elements selected with @ViewChild can be accessed without problem. For now you can use this little "hack" while search for a better solution or more elegant one. ex.
.hide-element{
display: none;
}
if you are handling some async return you can just use async pipe
Hope it helps.