Skip to content

Instantly share code, notes, and snippets.

@joeldenning
Last active November 29, 2016 17:35
Show Gist options
  • Save joeldenning/d95775208c12b648ebc0e893258ec5be to your computer and use it in GitHub Desktop.
Save joeldenning/d95775208c12b648ebc0e893258ec5be to your computer and use it in GitHub Desktop.
import singleSpaAngular1 from 'single-spa-angular1';
import angular from 'angular';
import './app.module.js';
import './routes.js';
const domElementGetter = () => document.getElementById('cool-app');
const angularLifecycles = singleSpaAngular1({
angular,
domElementGetter,
mainAngularModule: 'single-spa-app',
uiRouter: true,
preserveGlobal: true,
});
export const bootstrap = [aboutToBootstrap, angularLifecycles.bootstrap, doneBootstrapping];
export const mount = [angularLifecycles.mount];
export const unmount = [angularLifecycles.unmount];
function aboutToBootstrap() {
console.log("about to bootstrapping");
return Promise.resolve();
}
function doneBootstrap() {
console.log("finished bootstrapping");
return Promise.resolve();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment