Home > Enterprise >  Angular - Run multiple project in a single application
Angular - Run multiple project in a single application

Time:11-06

I'm working on a complex project with hundreds of components, soon new team will start to work with us. Our goal is to keep our development, building and deployments process completely separated.

Main app (already developed) team 1 started on port 4200 with menu, header, content section().

slave app - team 2 we want load their components in our content section with routing system if they create a new component and new routing we wants load it in main app without needs to rebuild main app

Is there a way to achieve this? Or any similar suggestion

Actually we are thinking of doing it with iframe ( but i dislike this solution )

thanks

CodePudding user response:

Use monorepostyle multiproject workspace which is supported for quite some time now by angular-cli. You will be able to integrate both applications like it would be single app.

CodePudding user response:

If you dont want to rebuild the main app, you can use the microfrontend approach. Here you can find some more information: https://www.angulararchitects.io/en/aktuelles/the-microfrontend-revolution-part-2-module-federation-with-angular/

There are several talk (on youtube) by Manfred Steyer about the topic. The example application he always is talking about is a flight app, one team is providing the booking section and the other ...

The main application loads the content from another application and the application do share for example the angular framework.


If it is no problem to rebuild you application i suggestion a mono repository managed by NX ... maybe you can give it a try.

  • Related