How to use the angular2-universal.Bootloader function in angular2-universal

To help you get started, we’ve selected a few angular2-universal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / universal-starter / src / main.prerender.ts View on Github external
export function getBootloader(locals) {
  return new Bootloader({
    template: require('./index.html'),
    platformProviders: [
      {provide: ORIGIN_URL, useValue: locals.origin},
      {provide: APP_BASE_HREF, useValue: locals.baseUrl},
      {provide: BASE_URL, useValue: locals.baseUrl},
      {provide: REQUEST_URL, useValue: '/'},
      NODE_LOCATION_PROVIDERS
    ],
    beautify: true,
    async: true,
    preboot: false
  });
}
github angular / angular-cli / packages / angular-cli / blueprints / mobile / files / __path__ / main-app-shell.ts View on Github external
export function getBootloader() : Bootloader  {
  return new Bootloader(bootloaderConfig);
}