Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ngx Bootstrap modal and viewchild component is always undefined #6627

Open
cheikhnadiouf opened this issue Dec 13, 2023 · 0 comments
Open

Ngx Bootstrap modal and viewchild component is always undefined #6627

cheikhnadiouf opened this issue Dec 13, 2023 · 0 comments

Comments

@cheikhnadiouf
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant