@@ -143,7 +143,8 @@ describe('applyRedirects', () => {
143
143
describe ( 'lazy loading' , ( ) => {
144
144
it ( 'should load config on demand' , ( ) => {
145
145
const loadedConfig = new LoadedRouterConfig (
146
- [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
146
+ [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
147
+ < any > 'injectorFactory' ) ;
147
148
const loader = {
148
149
load : ( injector : any , p : any ) => {
149
150
if ( injector !== 'providedInjector' ) throw 'Invalid Injector' ;
@@ -171,7 +172,8 @@ describe('applyRedirects', () => {
171
172
172
173
it ( 'should load when all canLoad guards return true' , ( ) => {
173
174
const loadedConfig = new LoadedRouterConfig (
174
- [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
175
+ [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
176
+ < any > 'injectorFactory' ) ;
175
177
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
176
178
177
179
const guard = ( ) => true ;
@@ -191,7 +193,8 @@ describe('applyRedirects', () => {
191
193
192
194
it ( 'should not load when any canLoad guards return false' , ( ) => {
193
195
const loadedConfig = new LoadedRouterConfig (
194
- [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
196
+ [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
197
+ < any > 'injectorFactory' ) ;
195
198
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
196
199
197
200
const trueGuard = ( ) => true ;
@@ -216,7 +219,8 @@ describe('applyRedirects', () => {
216
219
217
220
it ( 'should not load when any canLoad guards is rejected (promises)' , ( ) => {
218
221
const loadedConfig = new LoadedRouterConfig (
219
- [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
222
+ [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
223
+ < any > 'injectorFactory' ) ;
220
224
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
221
225
222
226
const trueGuard = ( ) => Promise . resolve ( true ) ;
@@ -237,7 +241,8 @@ describe('applyRedirects', () => {
237
241
238
242
it ( 'should work with objects implementing the CanLoad interface' , ( ) => {
239
243
const loadedConfig = new LoadedRouterConfig (
240
- [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
244
+ [ { path : 'b' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
245
+ < any > 'injectorFactory' ) ;
241
246
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
242
247
243
248
const guard = { canLoad : ( ) => Promise . resolve ( true ) } ;
@@ -254,7 +259,8 @@ describe('applyRedirects', () => {
254
259
255
260
it ( 'should work with absolute redirects' , ( ) => {
256
261
const loadedConfig = new LoadedRouterConfig (
257
- [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
262
+ [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
263
+ < any > 'injectorFactory' ) ;
258
264
259
265
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
260
266
@@ -269,7 +275,8 @@ describe('applyRedirects', () => {
269
275
270
276
it ( 'should load the configuration only once' , ( ) => {
271
277
const loadedConfig = new LoadedRouterConfig (
272
- [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
278
+ [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
279
+ < any > 'injectorFactory' ) ;
273
280
274
281
let called = false ;
275
282
const loader = {
@@ -295,7 +302,8 @@ describe('applyRedirects', () => {
295
302
296
303
it ( 'should load the configuration of a wildcard route' , ( ) => {
297
304
const loadedConfig = new LoadedRouterConfig (
298
- [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
305
+ [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
306
+ < any > 'injectorFactory' ) ;
299
307
300
308
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
301
309
@@ -308,7 +316,8 @@ describe('applyRedirects', () => {
308
316
309
317
it ( 'should load the configuration after a local redirect from a wildcard route' , ( ) => {
310
318
const loadedConfig = new LoadedRouterConfig (
311
- [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
319
+ [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
320
+ < any > 'injectorFactory' ) ;
312
321
313
322
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
314
323
@@ -322,7 +331,8 @@ describe('applyRedirects', () => {
322
331
323
332
it ( 'should load the configuration after an absolute redirect from a wildcard route' , ( ) => {
324
333
const loadedConfig = new LoadedRouterConfig (
325
- [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ) ;
334
+ [ { path : '' , component : ComponentB } ] , < any > 'stubInjector' , < any > 'stubFactoryResolver' ,
335
+ < any > 'injectorFactory' ) ;
326
336
327
337
const loader = { load : ( injector : any , p : any ) => of ( loadedConfig ) } ;
328
338
0 commit comments