I studied the code available on angular.io, and I replicated it in my scenario with a mat-tab-group
. However, I would like to be able to use the ad-host directive inside a *ngFor
. I tried it, and the directive is always undefined
.
I searched here and, while there are several questions addressing this problem, I found no clear example on how to do this. The idea is that I have a mat-tab-group
composed of several mat-tabs
, which are loaded through a *ngFor
directive. In each tab I would like to show a different component according to the selected index. Is there any way to achieve this?
Here is my modified stackblitz: as you can see it literally says this.adHost is undefined
in the console.