Angular import issue when using sub apps with the main app (usual setup with added projects folder)

39 Views Asked by At

I have a big Angular 10 project. I used it as a one-application setup project. But since I wanted to move out different parts to run independently, I added sub-applications, which created the projects folder and the applications under it, and modified the main angular.json and some other files, nothing new. When I run the sub-applications, nothing bad happens, no errors, and all is fine. But when I try to run the main application, I start getting errors like NG8002: Can't bind to 'ngStyle' since it isn't a known property of 'section'. This points me to an import error, but the CommonModule which could cause this error is imported in the main app and also in the sub-apps. Is there any configuration I should add to prevent these errors from happening? I am new to the multi-application workspace setup method in Angular.

0

There are 0 best solutions below