No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
bfaulk96 and robinComa Added Customizable MaxBootstrapTimeout (#27)
* Updated to look for a max bootstrap time in the singleSpa props.customProps before defaulting to 3000ms

* Updated to set default load timeout if no customProps object is given.

* Moved maxBootstrapTime variable outside of setInterval so that ternary operator is only called once to determine timeout value.

* Changed customProps variable name from setBootstrapMaxTime to bootstrapMaxTime

* Updated moving customProps to `props` object to comply with new changes in single-spa 4.0.0
Latest commit a73db72 Jul 25, 2018

README.md

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

import { loader } from 'single-spa-angular-cli';

const lifecycles = loader({
    name: 'app1',
    selector: 'app1-root',
    baseHref: '/app1'
});

export const bootstrap = [
    lifecycles.bootstrap
];

export const mount = [
    lifecycles.mount
];

export const unmount = [
    lifecycles.unmount
];

export const unload = [
    lifecycles.unload
];

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.