77 */
88
99import { Location , LocationStrategy , PathLocationStrategy } from '@angular/common' ;
10- import { ANALYZE_FOR_ENTRY_COMPONENTS , APP_BOOTSTRAP_LISTENER , APP_INITIALIZER , ApplicationRef , ComponentResolver , Injector , NgModuleFactoryLoader , OpaqueToken , SystemJsNgModuleLoader } from '@angular/core' ;
10+ import { ANALYZE_FOR_ENTRY_COMPONENTS , APP_BOOTSTRAP_LISTENER , APP_INITIALIZER , ApplicationRef , Compiler , ComponentResolver , Injector , NgModuleFactoryLoader , OpaqueToken , SystemJsNgModuleLoader } from '@angular/core' ;
1111
1212import { Route , Routes } from './config' ;
1313import { Router } from './router' ;
@@ -30,13 +30,13 @@ export interface ExtraOptions {
3030export function setupRouter (
3131 ref : ApplicationRef , resolver : ComponentResolver , urlSerializer : UrlSerializer ,
3232 outletMap : RouterOutletMap , location : Location , injector : Injector ,
33- loader : NgModuleFactoryLoader , config : Route [ ] [ ] , opts : ExtraOptions = { } ) {
33+ loader : NgModuleFactoryLoader , compiler : Compiler , config : Route [ ] [ ] , opts : ExtraOptions = { } ) {
3434 if ( ref . componentTypes . length == 0 ) {
3535 throw new Error ( 'Bootstrap at least one component before injecting Router.' ) ;
3636 }
3737 const componentType = ref . componentTypes [ 0 ] ;
3838 const r = new Router (
39- componentType , resolver , urlSerializer , outletMap , location , injector , loader ,
39+ componentType , resolver , urlSerializer , outletMap , location , injector , loader , compiler ,
4040 flatten ( config ) ) ;
4141
4242 if ( opts . enableTracing ) {
@@ -92,7 +92,7 @@ export function provideRouter(routes: Routes, config: ExtraOptions = {}): any[]
9292 useFactory : setupRouter ,
9393 deps : [
9494 ApplicationRef , ComponentResolver , UrlSerializer , RouterOutletMap , Location , Injector ,
95- NgModuleFactoryLoader , ROUTES , ROUTER_CONFIGURATION
95+ NgModuleFactoryLoader , Compiler , ROUTES , ROUTER_CONFIGURATION
9696 ]
9797 } ,
9898
0 commit comments