How to use the angular2-universal.bootstrap 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 justindujardin / ng2-material / examples / platform / node / bootstrap.ts View on Github external
import {bootstrap} from "angular2-universal";
import {ROUTER_PROVIDERS} from "angular2/router"; 
import {MATERIAL_NODE_PROVIDERS} from "ng2-material/all";
import {HTTP_PROVIDERS} from "angular2/http";
import {ComponentsService} from "../../services/components";
import {NavigationService} from "../../services/navigation";
import {VersionService} from "../../services/version";
import {DemosApp} from "../../app";

bootstrap(DemosApp, [
  HTTP_PROVIDERS, ROUTER_PROVIDERS, MATERIAL_NODE_PROVIDERS,
  ComponentsService, NavigationService, VersionService
]);
github justindujardin / ng2-material / modules / site / src / client.ts View on Github external
import "angular2-universal/polyfills";
import {prebootComplete, bootstrap} from "angular2-universal";
import {ROUTER_PROVIDERS} from "@angular/router-deprecated";
import {HTTP_PROVIDERS} from "@angular/http";
import {enableProdMode} from "@angular/core";
import {App} from "./app";
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
import {DEMO_BROWSER_PROVIDERS} from "./all";

enableProdMode();

bootstrap(App, [
  ...ROUTER_PROVIDERS,
  ...HTTP_PROVIDERS,
  ...DEMO_BROWSER_PROVIDERS,
  ...MATERIAL_BROWSER_PROVIDERS
])
  .then(prebootComplete);