Search code examples
single-spa-angularsingle-spa

Single-Spa starting from scratch - angular 8 not rendering html


I started single-spa app from scratch following:

https://medium.com/@AndrewLocke/creating-a-single-spa-web-application-4e115802f474

I wanted to use angular, so I created another app using

ng new my-app --routing --prefix my-app

and app was working fine, then I've added single-spa-angular by

ng add single-spa-angular

and application stopped rendering, even calling angular.version from console in dev tools returns error: angular is not defined.

How can I render this application? Or have live reloading for development?


Solution

  • This is fine I guess. When you add single-spa-angular the angular.json is changed (check it in git). The application gets a new rendering mode. Just continue with the tutorial and finish configuring the apps.

    Also check the package.json file for new scripts. There should be one build and serve script for single-spa and a different ones for standalone use.