Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TheLarkInn/e0e21c8b975a3d7288b49aa400f86c07 to your computer and use it in GitHub Desktop.
Save TheLarkInn/e0e21c8b975a3d7288b49aa400f86c07 to your computer and use it in GitHub Desktop.
How to include providers custom and app providers in bootstrap function. Angular2
import {bootstrap} from 'angular2/platform/browser';
import {DIRECTIVES, PIPES, PROVIDERS, ENV_PROVIDERS, PLUGINS} from './platform/browser';
import {App, APP_PROVIDERS} from './app';
bootstrap(App, [
...PROVIDERS,
...ENV_PROVIDERS,
...DIRECTIVES,
...PIPES,
...APP_PROVIDERS,
...PLUGINS
]).catch(console.error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment