AE
Size: a a a
AE
ИМ
ИМ
AM
AK
private createToastInstance(config: ToastConfig) {
const toastFactory = this.cfr.resolveComponentFactory(ToastComponent);
const toastComponentRef = toastFactory.create(this.injector);
toastComponentRef.instance.config = config;
toastComponentRef.changeDetectorRef.detectChanges();
return toastComponentRef.componentType;
}
g-container(*ngFor="let toast of toasts$ | async»)
ng-container(*ngComponentOutlet="toast»).
onfig.
Если добавлять в нем вызов консоли в хуке ngAfterViewInit,
то видно, что хук вызывается дважды и первый раз в нем есть config, а потом нет (undefined). gComponentOutlet
не подразумевает прокидывание данных в инстанс?Вキ
private createToastInstance(config: ToastConfig) {
const toastFactory = this.cfr.resolveComponentFactory(ToastComponent);
const toastComponentRef = toastFactory.create(this.injector);
toastComponentRef.instance.config = config;
toastComponentRef.changeDetectorRef.detectChanges();
return toastComponentRef.componentType;
}
g-container(*ngFor="let toast of toasts$ | async»)
ng-container(*ngComponentOutlet="toast»).
onfig.
Если добавлять в нем вызов консоли в хуке ngAfterViewInit,
то видно, что хук вызывается дважды и первый раз в нем есть config, а потом нет (undefined). gComponentOutlet
не подразумевает прокидывание данных в инстанс?С
S
AK
Вキ
AK
PL
S
🧤K
PL
🧤K
S
PL
И
E