I am building microfrontend using Single-Spa-Angular library. I have created three different child app using "ng add single-spa-angular" and two of the app working fine, but one app showing below error:
Uncaught app2: Application 'app2' died in status UNMOUNTING: Cannot read property 'injector' of undefined
at http://<HOSTNAME>:4202/main.js:204363:53
and
Uncaught app2: Application 'app2' died in status SKIP_BECAUSE_BROKEN: In this configuration Angular requires Zone.js
at new NgZone (http://<HOST>:4202/main.js:68725:19)
at getNgZone (http://<HOST>:4202/main.js:69414:13)
at PlatformRef../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (http://<HOST>:4202/main.js:69312:22)
at http://<HOST>:4202/main.js:69356:59
can any one help me out.
Thanks Shashi Bhushan Verma
I was facing the same issue. Add the following line in your main.single-spa.ts file:
import 'zone.js/dist/zone';
This seemed to work for me.