ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Ngx Bootstrap modal and viewchild component is always undefined

Open cheikhnadiouf opened this issue 2 years ago • 1 comments

In a parent component using a modal, ngTemplate and a child component called createComponent): @ViewChild(CreateComponent, { static: false }) createComponent: CreateComponent | undefined; ... ngAfterViewInit(): void { console.log(this.createComponent?.unit); // createComponent is always UNDEFINED } It is the same issue without solutions than this alert since 5 years:

https://stackoverflow.com/questions/51959167/angula6-viewchild-in-ng-bootstrap-ng-bootstrap-ngbmodalmodule-modal-returns-und

cheikhnadiouf avatar Dec 13 '23 16:12 cheikhnadiouf

You refer to ng-bootstrap in your stack-overflow reference. Thats another library.

lexasq avatar Jul 11 '24 09:07 lexasq