Execute this scripts in the order:
npm install
npm run build:elements
npm start
- Execute
ng generate application micro-module-name
- Copy and adapt
/projects/micro-one/build.js
to your new project - Comment
import 'zone.js/dist/zone';
onpolyfills
of the new project - Replace
bootstrap
byentryComponents
intoapp.module.ts
- Copy this code into your
AppModule
constructor(injector: Injector) { const el = createCustomElement(AppComponent, { injector }); customElements.define('micro-module-name', el); } ngDoBootstrap() {}
- Add and adapt needed scripts on
package.json