@mashroom/mashroom-portal-demo-angular-app

2.6.1 • Public • Published

Mashroom Portal Demo Angular App

Plugin for Mashroom Server, a Microfrontend Integration Platform.

This is a simple Angular based SPA which can be developed and run standalone, but can also act as a building block in the Mashroom Portal.

Usage

If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-portal-demo-angular-app as dependency.

Then you can place it on any page via Portal Admin Toolbar.

Implementation hints

Angular was clearly designed for monolithic web applications that use the whole browser window. So, to make it more behave like a Microfrontend you have to change a few things in the template generated by the Angular CLI:

  • Since you can register a NgModule only once, use a dummy main module that loads the actual app module (see loader.module.ts), otherwise you could not load the App multiple times with different configurations on the same page
  • Remove all polyfills, since Microfrontends should not install global libraries
  • Get rid of zone.js because it installs itself globally and might infer with other Apps

/@mashroom/mashroom-portal-demo-angular-app/

    Package Sidebar

    Install

    npm i @mashroom/mashroom-portal-demo-angular-app

    Weekly Downloads

    8

    Version

    2.6.1

    License

    MIT

    Unpacked Size

    125 kB

    Total Files

    10

    Last publish

    Collaborators

    • jkofler