import { bootstrap as coreBootstrap } from './bootstrap/core' ; import { bootstrap as commonBootstrap } from '../common/common' ; import { bootstrap as bootstrapHelper } from './bootstrap/index' ; import { Injector , provide } from '../core/core' ; export function bootstrap ( ngModule , component , providers = [ ] ) { coreBootstrap ( ngModule ) ; commonBootstrap ( ngModule ) ; bootstrapHelper ( ngModule , provide ( Injector , { useFactory : ( ) => new Injector ( ) } ) ) ; providers . forEach ( provider => bootstrapHelper ( ngModule , provider ) ) ; bootstrapHelper ( ngModule , component ) ; }