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

ngAfterViewInit and ngOnInit not called #1

Open
HeneryHawk opened this issue Aug 4, 2022 · 0 comments
Open

ngAfterViewInit and ngOnInit not called #1

HeneryHawk opened this issue Aug 4, 2022 · 0 comments

Comments

@HeneryHawk
Copy link

Hi @manfredsteyer,

thanks for your example and information about Module Federation in the context of Micro Frontends.
I have packaged an app as an Angular element in one of my projects to include it in another app. Since these two app use different Angular versions, the only way was through Web Components and Angular Elements.

App A, which is included as a microfrontend, uses ngOnInit and ngAfterViewInit in one of the components. These two hooks are called as usual when the app is included in the shell.
However, when I start App A standalone to develop, for example, these two hooks are no longer called.

Why is this?

I have used your app angular-app1 here and built an example where the error can be reproduced.
https://github.com/HeneryHawk/micro-frontend-module-federation -> b.component.ts

Regards

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