angular-micro-frontend-sample
angular-micro-frontend-sample copied to clipboard
Angular 7 Micro FrontEnd using Angular Elements
MicroFront
Since Angular 9, Ivy allow "micro frontend" using its private API. Check this repo if you are interested.
Try app
Execute this scripts in the order:
npm installnpm run build:elementsnpm start
Create new Micro module
- Execute
ng generate application micro-module-name - Copy and adapt
/projects/micro-one/build.jsto your new project - Comment
import 'zone.js/dist/zone';onpolyfillsof the new project - Replace
bootstrapbyentryComponentsintoapp.module.ts - Copy this code into your
AppModuleconstructor(injector: Injector) { const el = createCustomElement(AppComponent, { injector }); customElements.define('micro-module-name', el); } ngDoBootstrap() {} - Add and adapt needed scripts on
package.json