Skip to content

Instantly share code, notes, and snippets.

@alex-arriaga
Created April 26, 2016 19:33
Show Gist options
  • Save alex-arriaga/7adfcd6faaa5dd1d05c729058e2a1bbd to your computer and use it in GitHub Desktop.
Save alex-arriaga/7adfcd6faaa5dd1d05c729058e2a1bbd to your computer and use it in GitHub Desktop.
import { bootstrap } from "angular2/platform/browser";
import { provide, ComponentRef } from "angular2/core";
import { Provider } from "angular2/src/core/di/provider";
import { ROUTER_PROVIDERS, APP_BASE_HREF } from "angular2/router";
import { HTTP_PROVIDERS } from "angular2/http";
import 'rxjs/add/operator/map';
import { SERVICE_PROVIDERS } from "./authenticated/carbonldp/common/providers/carbon-services.provider";
import { AppComponent } from "app/app.component";
let providers : Provider[] = [];
providers = providers.concat( SERVICE_PROVIDERS );
bootstrap( AppComponent, [
ROUTER_PROVIDERS,
HTTP_PROVIDERS,
provide( APP_BASE_HREF, { useValue: "/src/" } ),
providers
] ).catch( ( error ) => {
console.error( "Couldn't bootstrap the application" );
console.error( error );
return Promise.reject( error );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment