- Create a Angular Shell or MainUI Application
- Create several Client or Micro Frontend Applications
- Change local ports to run the applications via ng serve in parallel
- Add one module and one component to each MicroApp
- Add routing to each MicroApp
- Run
ng add @angular-architects/module-federationfor each Angular App (MainUI and MicroUI's) - Expose each module of the MicroUI in the corresponding
webpack.config.js - Load
loadRemoteModulein MainUIapp-routing.module.ts
- Clone the repo from https://github.com/David-Siebert/angular-microfrontend
- Run
npm run initin a new terminal located in the root of the repo - Run
npm run Mainin a new terminal located in the root of the repo - Run
npm run AppAin a new terminal located in the root of the repo - Run
npm run AppBin a new terminal located in the root of the repo - Run
npm run AppCin a new terminal located in the root of the repo - Open Browser http://localhost:5000/ to see MainUI