single-spa-angular-cli
Helpers for building single-spa applications which use Angular Cli.
Example
An example can be found in the single-spa-angular-cli-examples repository.
Quickstart
First, in the child application, run npm install --save single-spa-angular-cli
. Then, in your single-spa application, do the following:
// loader.js ; const lifecycles = ; const bootstrap = lifecyclesbootstrap; const mount = lifecyclesmount; const unmount = lifecyclesunmount; const unload = lifecyclesunload;
Options
All options are passed to single-spa-angular2 via the opts
parameter when calling singleSpaAngularCli(opts)
. The following options are available:
name
: (required) The name of the single spa application, ex : app.selector
: (required) The angular application root tag, ex : app-root.container
: (optional) The html container selector, ex : ".container" or "#container".baseHref
: (required) The base href of your angular cli app, ex : /app.
Full documentation here
An example can be found in the single-spa-angular-cli-examples repository.