I have element with an ngIf. In my component I want to interact with that element but it's undefined.
@ViewChild('player', { static: false }) private set player(player: YouTubePlayer) {
if (player) {
console.log(player)
console.log(this.player)
}
}
the set gets called when the #player variable in the template is available and player is also defined, but this.player is undefined.