import { bootstrap } from 'angular2/platform/browser' ; import { DIRECTIVES , PIPES , PROVIDERS } from './platform/browser' ; import { ENV_PROVIDERS } from './platform/environment' ; import { AppComponent , APP_PROVIDERS } from './app' ; import { APP_ROUTES_PROVIDER } from './app/routes/routes' ; import { APP_REDUCERS_PROVIDER } from './app/reducers/reducers' ; import { APP_COMPONENTS_PROVIDERS } from './app/components/components' ; import { APP_CONTAINERS_PROVIDERS } from './app/containers/containers' ; import { APP_SERVICES } from './app/services/services' ; export function main ( initialHmrState ? ) { return bootstrap ( AppComponent , [ ... ENV_PROVIDERS , ... PROVIDERS , ... DIRECTIVES , ... PIPES , ... APP_PROVIDERS , APP_ROUTES_PROVIDER , APP_REDUCERS_PROVIDER , APP_COMPONENTS_PROVIDERS , APP_CONTAINERS_PROVIDERS , APP_SERVICES ] ) . catch ( err => console . error ( err ) ) ; } if ( 'development' === ENV && HMR === true ) { let ngHmr = require ( 'angular2-hmr' ) ; ngHmr . hotModuleReplacement ( main , module ) ; } else { document . addEventListener ( 'DOMContentLoaded' , ( ) => main ( ) ) ; }