@angular/router 3.4.6 → 3.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,6 @@ import { Route, Routes } from './config';
11
11
  import { RouteReuseStrategy } from './route_reuse_strategy';
12
12
  import { ErrorHandler, Router } from './router';
13
13
  import { RouterOutletMap } from './router_outlet_map';
14
- import { RouterPreloader } from './router_preloader';
15
14
  import { ActivatedRoute } from './router_state';
16
15
  import { UrlHandlingStrategy } from './url_handling_strategy';
17
16
  import { UrlSerializer } from './url_tree';
@@ -114,6 +113,31 @@ export declare function provideForRootGuard(router: Router): any;
114
113
  * @stable
115
114
  */
116
115
  export declare function provideRoutes(routes: Routes): any;
116
+ /**
117
+ * @whatItDoes Represents an option to configure when the initial navigation is performed.
118
+ *
119
+ * @description
120
+ * * 'enabled' - the initial navigation starts before the root component is created.
121
+ * The bootstrap is blocked until the initial navigation is complete.
122
+ * * 'disabled' - the initial navigation is not performed. The location listener is set up before
123
+ * the root component gets created.
124
+ * * 'legacy_enabled'- the initial navigation starts after the root component has been created.
125
+ * The bootstrap is not blocked until the initial navigation is complete. @deprecated
126
+ * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up
127
+ * after @deprecated
128
+ * the root component gets created.
129
+ * * `true` - same as 'legacy_enabled'. @deprecated
130
+ * * `false` - same as 'legacy_disabled'. @deprecated
131
+ *
132
+ * The 'enabled' option should be used for applications unless there is a reason to have
133
+ * more control over when the router starts its initial navigation due to some complex
134
+ * initialization logic. In this case, 'disabled' should be used.
135
+ *
136
+ * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.
137
+ *
138
+ * @experimental
139
+ */
140
+ export declare type InitialNavigation = boolean | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';
117
141
  /**
118
142
  * @whatItDoes Represents options to configure the router.
119
143
  *
@@ -131,7 +155,7 @@ export interface ExtraOptions {
131
155
  /**
132
156
  * Disables the initial navigation.
133
157
  */
134
- initialNavigation?: boolean;
158
+ initialNavigation?: InitialNavigation;
135
159
  /**
136
160
  * A custom error handler.
137
161
  */
@@ -143,17 +167,44 @@ export interface ExtraOptions {
143
167
  }
144
168
  export declare function setupRouter(ref: ApplicationRef, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy): Router;
145
169
  export declare function rootRoute(router: Router): ActivatedRoute;
146
- export declare function initialRouterNavigation(router: Router, ref: ApplicationRef, preloader: RouterPreloader, opts: ExtraOptions): (bootstrappedComponentRef: ComponentRef<any>) => void;
170
+ /**
171
+ * To initialize the router properly we need to do in two steps:
172
+ *
173
+ * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if
174
+ * a resolver or a guards executes asynchronously. Second, we need to actually run
175
+ * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation
176
+ * hook provided by the router to do that.
177
+ *
178
+ * The router navigation starts, reaches the point when preactivation is done, and then
179
+ * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.
180
+ */
181
+ export declare class RouterInitializer {
182
+ private injector;
183
+ private initNavigation;
184
+ private resultOfPreactivationDone;
185
+ constructor(injector: Injector);
186
+ appInitializer(): Promise<any>;
187
+ bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void;
188
+ private isLegacyEnabled(opts);
189
+ private isLegacyDisabled(opts);
190
+ }
191
+ export declare function getAppInitializer(r: RouterInitializer): any;
192
+ export declare function getBootstrapListener(r: RouterInitializer): any;
147
193
  /**
148
194
  * A token for the router initializer that will be called after the app is bootstrapped.
149
195
  *
150
196
  * @experimental
151
197
  */
152
198
  export declare const ROUTER_INITIALIZER: OpaqueToken;
153
- export declare function provideRouterInitializer(): ({
199
+ export declare function provideRouterInitializer(): (typeof RouterInitializer | {
200
+ provide: any;
201
+ multi: boolean;
202
+ useFactory: (r: RouterInitializer) => any;
203
+ deps: typeof RouterInitializer[];
204
+ } | {
154
205
  provide: OpaqueToken;
155
- useFactory: (router: Router, ref: ApplicationRef, preloader: RouterPreloader, opts: ExtraOptions) => (bootstrappedComponentRef: ComponentRef<any>) => void;
156
- deps: (OpaqueToken | typeof Router | typeof RouterPreloader | typeof ApplicationRef)[];
206
+ useFactory: (r: RouterInitializer) => any;
207
+ deps: typeof RouterInitializer[];
157
208
  } | {
158
209
  provide: OpaqueToken;
159
210
  multi: boolean;
@@ -5,8 +5,10 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { APP_BASE_HREF, HashLocationStrategy, Location, LocationStrategy, PathLocationStrategy, PlatformLocation } from '@angular/common';
9
- import { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, ApplicationRef, Compiler, Inject, Injector, NgModule, NgModuleFactoryLoader, NgProbeToken, OpaqueToken, Optional, SkipSelf, SystemJsNgModuleLoader } from '@angular/core';
8
+ import { APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation } from '@angular/common';
9
+ import { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, Inject, Injectable, Injector, NgModule, NgModuleFactoryLoader, NgProbeToken, OpaqueToken, Optional, SkipSelf, SystemJsNgModuleLoader } from '@angular/core';
10
+ import { Subject } from 'rxjs/Subject';
11
+ import { of } from 'rxjs/observable/of';
10
12
  import { RouterLink, RouterLinkWithHref } from './directives/router_link';
11
13
  import { RouterLinkActive } from './directives/router_link_active';
12
14
  import { RouterOutlet } from './directives/router_outlet';
@@ -275,26 +277,138 @@ export function rootRoute(router) {
275
277
  return router.routerState.root;
276
278
  }
277
279
  /**
278
- * @param {?} router
279
- * @param {?} ref
280
- * @param {?} preloader
281
- * @param {?} opts
282
- * @return {?}
280
+ * To initialize the router properly we need to do in two steps:
281
+ *
282
+ * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if
283
+ * a resolver or a guards executes asynchronously. Second, we need to actually run
284
+ * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation
285
+ * hook provided by the router to do that.
286
+ *
287
+ * The router navigation starts, reaches the point when preactivation is done, and then
288
+ * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.
283
289
  */
284
- export function initialRouterNavigation(router, ref, preloader, opts) {
285
- return function (bootstrappedComponentRef) {
290
+ export var RouterInitializer = (function () {
291
+ /**
292
+ * @param {?} injector
293
+ */
294
+ function RouterInitializer(injector) {
295
+ this.injector = injector;
296
+ this.initNavigation = false;
297
+ this.resultOfPreactivationDone = new Subject();
298
+ }
299
+ /**
300
+ * @return {?}
301
+ */
302
+ RouterInitializer.prototype.appInitializer = function () {
303
+ var _this = this;
304
+ var /** @type {?} */ p = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
305
+ return p.then(function () {
306
+ var /** @type {?} */ resolve = null;
307
+ var /** @type {?} */ res = new Promise(function (r) { return resolve = r; });
308
+ var /** @type {?} */ router = _this.injector.get(Router);
309
+ var /** @type {?} */ opts = _this.injector.get(ROUTER_CONFIGURATION);
310
+ if (_this.isLegacyDisabled(opts) || _this.isLegacyEnabled(opts)) {
311
+ resolve(true);
312
+ }
313
+ else if (opts.initialNavigation === 'disabled') {
314
+ router.setUpLocationChangeListener();
315
+ resolve(true);
316
+ }
317
+ else if (opts.initialNavigation === 'enabled') {
318
+ router.hooks.afterPreactivation = function () {
319
+ // only the initial navigation should be delayed
320
+ if (!_this.initNavigation) {
321
+ _this.initNavigation = true;
322
+ resolve(true);
323
+ return _this.resultOfPreactivationDone;
324
+ }
325
+ else {
326
+ return of(null);
327
+ }
328
+ };
329
+ router.initialNavigation();
330
+ }
331
+ else {
332
+ throw new Error("Invalid initialNavigation options: '" + opts.initialNavigation + "'");
333
+ }
334
+ return res;
335
+ });
336
+ };
337
+ /**
338
+ * @param {?} bootstrappedComponentRef
339
+ * @return {?}
340
+ */
341
+ RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {
342
+ var /** @type {?} */ opts = this.injector.get(ROUTER_CONFIGURATION);
343
+ var /** @type {?} */ preloader = this.injector.get(RouterPreloader);
344
+ var /** @type {?} */ router = this.injector.get(Router);
345
+ var /** @type {?} */ ref = this.injector.get(ApplicationRef);
286
346
  if (bootstrappedComponentRef !== ref.components[0]) {
287
347
  return;
288
348
  }
289
- router.resetRootComponentType(ref.componentTypes[0]);
290
- preloader.setUpPreloading();
291
- if (opts.initialNavigation === false) {
292
- router.setUpLocationChangeListener();
293
- }
294
- else {
349
+ if (this.isLegacyEnabled(opts)) {
295
350
  router.initialNavigation();
296
351
  }
352
+ else if (this.isLegacyDisabled(opts)) {
353
+ router.setUpLocationChangeListener();
354
+ }
355
+ preloader.setUpPreloading();
356
+ router.resetRootComponentType(ref.componentTypes[0]);
357
+ this.resultOfPreactivationDone.next(null);
358
+ this.resultOfPreactivationDone.complete();
359
+ };
360
+ /**
361
+ * @param {?} opts
362
+ * @return {?}
363
+ */
364
+ RouterInitializer.prototype.isLegacyEnabled = function (opts) {
365
+ return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||
366
+ opts.initialNavigation === undefined;
297
367
  };
368
+ /**
369
+ * @param {?} opts
370
+ * @return {?}
371
+ */
372
+ RouterInitializer.prototype.isLegacyDisabled = function (opts) {
373
+ return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;
374
+ };
375
+ RouterInitializer.decorators = [
376
+ { type: Injectable },
377
+ ];
378
+ /** @nocollapse */
379
+ RouterInitializer.ctorParameters = function () { return [
380
+ { type: Injector, },
381
+ ]; };
382
+ return RouterInitializer;
383
+ }());
384
+ function RouterInitializer_tsickle_Closure_declarations() {
385
+ /** @type {?} */
386
+ RouterInitializer.decorators;
387
+ /**
388
+ * @nocollapse
389
+ * @type {?}
390
+ */
391
+ RouterInitializer.ctorParameters;
392
+ /** @type {?} */
393
+ RouterInitializer.prototype.initNavigation;
394
+ /** @type {?} */
395
+ RouterInitializer.prototype.resultOfPreactivationDone;
396
+ /** @type {?} */
397
+ RouterInitializer.prototype.injector;
398
+ }
399
+ /**
400
+ * @param {?} r
401
+ * @return {?}
402
+ */
403
+ export function getAppInitializer(r) {
404
+ return r.appInitializer.bind(r);
405
+ }
406
+ /**
407
+ * @param {?} r
408
+ * @return {?}
409
+ */
410
+ export function getBootstrapListener(r) {
411
+ return r.bootstrapListener.bind(r);
298
412
  }
299
413
  /**
300
414
  * A token for the router initializer that will be called after the app is bootstrapped.
@@ -307,11 +421,14 @@ export var /** @type {?} */ ROUTER_INITIALIZER = new OpaqueToken('Router Initial
307
421
  */
308
422
  export function provideRouterInitializer() {
309
423
  return [
424
+ RouterInitializer,
310
425
  {
311
- provide: ROUTER_INITIALIZER,
312
- useFactory: initialRouterNavigation,
313
- deps: [Router, ApplicationRef, RouterPreloader, ROUTER_CONFIGURATION]
426
+ provide: APP_INITIALIZER,
427
+ multi: true,
428
+ useFactory: getAppInitializer,
429
+ deps: [RouterInitializer]
314
430
  },
431
+ { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },
315
432
  { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },
316
433
  ];
317
434
  }
@@ -1 +1 @@
1
- {"version":3,"file":"router_module.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/router_module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,aAAa,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB;OAChI,EAAC,4BAA4B,EAAE,sBAAsB,EAAE,cAAc,EAAE,QAAQ,EAAgB,MAAM,EAAE,QAAQ,EAAuB,QAAQ,EAAE,qBAAqB,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ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M,gBAAgB,CAAC,kBAAkB,GAAG,IAAI,WAAW,CAAC,oBAAoB,CAAC,CAAC;AACzF;;GAEG;AACH;IACE,MAAM,CAAC;QACL;YACE,OAAO,EAAE,kBAAkB;YAC3B,UAAU,EAAE,uBAAuB;YACnC,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,CAAC;SACtE;QACD,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;KAChF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LocationStrategy, PathLocationStrategy, PlatformLocation} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, ApplicationRef, Compiler, ComponentRef, Inject, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OpaqueToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\n\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {getDOM} from './private_import_platform-browser';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {RouterOutletMap} from './router_outlet_map';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @whatItDoes Contains a list of directives\n * @stable\n */\nconst /** @type {?} */ ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];\n\n/**\n * @whatItDoes Is used in DI to configure the router.\n * @stable\n */\nexport const /** @type {?} */ ROUTER_CONFIGURATION = new OpaqueToken('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const /** @type {?} */ ROUTER_FORROOT_GUARD = new OpaqueToken('ROUTER_FORROOT_GUARD');\n\nexport const /** @type {?} */ ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, RouterOutletMap, Location, Injector, NgModuleFactoryLoader,\n Compiler, ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()]\n ]\n },\n RouterOutletMap,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n/**\n * @return {?}\n */\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * \\@whatItDoes Adds router directives and providers.\n * \n * \\@howToUse \n * \n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n * \n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n * \n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n * \n * When registered at the root, the module should be used as follows\n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * For submodules and lazy loaded submodules the module should be used as follows:\n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * \\@description \n * \n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n * \n * The Angular 2 router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n * \n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n * \n * \\@stable\n */\nexport class RouterModule {\n/**\n * @param {?} guard\n */\nconstructor( guard: any) {}\n/**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n * \n * Options:\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * @param {?} routes\n * @param {?=} config\n * @return {?}\n */\nstatic forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n/**\n * Creates a module with all the router directives and a provider registering routes.\n * @param {?} routes\n * @return {?}\n */\nstatic forChild(routes: Routes): ModuleWithProviders {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD, ] }, ]},\n];\n}\n\nfunction RouterModule_tsickle_Closure_declarations() {\n/** @type {?} */\nRouterModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRouterModule.ctorParameters;\n}\n\n/**\n * @param {?} platformLocationStrategy\n * @param {?} baseHref\n * @param {?=} options\n * @return {?}\n */\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n/**\n * @param {?} router\n * @return {?}\n */\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n/**\n * \\@whatItDoes Registers routes.\n * \n * \\@howToUse \n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * \\@stable\n * @param {?} routes\n * @return {?}\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n\n/**\n * @whatItDoes Represents options to configure the router.\n *\n * @stable\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: boolean;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See {@link PreloadAllModules}.\n */\n preloadingStrategy?: any;\n}\n/**\n * @param {?} ref\n * @param {?} urlSerializer\n * @param {?} outletMap\n * @param {?} location\n * @param {?} injector\n * @param {?} loader\n * @param {?} compiler\n * @param {?} config\n * @param {?=} opts\n * @param {?=} urlHandlingStrategy\n * @param {?=} routeReuseStrategy\n * @return {?}\n */\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, outletMap: RouterOutletMap,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const /** @type {?} */ router = new Router(\n null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.enableTracing) {\n const /** @type {?} */ dom = getDOM();\n router.events.subscribe(e => {\n dom.logGroup(`Router Event: ${( /** @type {?} */((<any>e.constructor))).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n return router;\n}\n/**\n * @param {?} router\n * @return {?}\n */\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n/**\n * @param {?} router\n * @param {?} ref\n * @param {?} preloader\n * @param {?} opts\n * @return {?}\n */\nexport function initialRouterNavigation(\n router: Router, ref: ApplicationRef, preloader: RouterPreloader, opts: ExtraOptions) {\n return (bootstrappedComponentRef: ComponentRef<any>) => {\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n router.resetRootComponentType(ref.componentTypes[0]);\n preloader.setUpPreloading();\n if (opts.initialNavigation === false) {\n router.setUpLocationChangeListener();\n } else {\n router.initialNavigation();\n }\n };\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @experimental\n */\nexport const /** @type {?} */ ROUTER_INITIALIZER = new OpaqueToken('Router Initializer');\n/**\n * @return {?}\n */\nexport function provideRouterInitializer() {\n return [\n {\n provide: ROUTER_INITIALIZER,\n useFactory: initialRouterNavigation,\n deps: [Router, ApplicationRef, RouterPreloader, ROUTER_CONFIGURATION]\n },\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"file":"router_module.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/router_module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,aAAa,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB;OACtJ,EAAC,4BAA4B,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAgB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAuB,QAAQ,EAAE,qBAAqB,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAY,QAAQ,EAAE,sBAAsB,EAAC,MAAM,eAAe;OACzS,EAAC,OAAO,EAAC,MAAM,cAAc;OAC7B,EAAC,EAAE,EAAE,MAAM,oBAAoB;OAG/B,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,0BAA0B;OAChE,EAAC,gBAAgB,EAAC,MAAM,iCAAiC;OACzD,EAAC,YAAY,EAAC,MAAM,4BAA4B;OAChD,EAAC,MAAM,EAAC,MAAM,mCAAmC;OACjD,EAAC,kBAAkB,EAAC,MAAM,wBAAwB;OAClD,EAAe,MAAM,EAAC,MAAM,UAAU;OACtC,EAAC,MAAM,EAAC,MAAM,wBAAwB;OACtC,EAAC,eAAe,EAAC,MAAM,qBAAq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AAAD,CAAC,AA9FD,IA8FC;AAED;IACA,gBAAgB;IAChB,iBAAiB,CAAC,UAAU,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,cAAc,CAAC;IACjC,gBAAgB;IAChB,iBAAiB,CAAC,SAAS,CAAC,cAAc,CAAC;IAC3C,gBAAgB;IAChB,iBAAiB,CAAC,SAAS,CAAC,yBAAyB,CAAC;IACtD,gBAAgB;IAChB,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,kCAAkC,CAAoB;IACpD,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AACD;;;GAGG;AACH,qCAAqC,CAAoB;IACvD,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;AAED;;;;GAIG;AACH,OAAO,IAAM,gBAAgB,CAAC,kBAAkB,GAAG,IAAI,WAAW,CAAC,oBAAoB,CAAC,CAAC;AACzF;;GAEG;AACH;IACE,MAAM,CAAC;QACL,iBAAiB;QACjB;YACE,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE,IAAI;YACX,UAAU,EAAE,iBAAiB;YAC7B,IAAI,EAAE,CAAC,iBAAiB,CAAC;SAC1B;QACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;QAC1F,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;KAChF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OpaqueToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {Subject} from 'rxjs/Subject';\nimport {of } from 'rxjs/observable/of';\n\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {getDOM} from './private_import_platform-browser';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {RouterOutletMap} from './router_outlet_map';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {ActivatedRoute, RouterStateSnapshot} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @whatItDoes Contains a list of directives\n * @stable\n */\nconst /** @type {?} */ ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];\n\n/**\n * @whatItDoes Is used in DI to configure the router.\n * @stable\n */\nexport const /** @type {?} */ ROUTER_CONFIGURATION = new OpaqueToken('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const /** @type {?} */ ROUTER_FORROOT_GUARD = new OpaqueToken('ROUTER_FORROOT_GUARD');\n\nexport const /** @type {?} */ ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, RouterOutletMap, Location, Injector, NgModuleFactoryLoader,\n Compiler, ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()]\n ]\n },\n RouterOutletMap,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n/**\n * @return {?}\n */\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * \\@whatItDoes Adds router directives and providers.\n * \n * \\@howToUse \n * \n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n * \n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n * \n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n * \n * When registered at the root, the module should be used as follows\n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * For submodules and lazy loaded submodules the module should be used as follows:\n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * \\@description \n * \n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n * \n * The Angular 2 router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n * \n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n * \n * \\@stable\n */\nexport class RouterModule {\n/**\n * @param {?} guard\n */\nconstructor( guard: any) {}\n/**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n * \n * Options:\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * @param {?} routes\n * @param {?=} config\n * @return {?}\n */\nstatic forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n/**\n * Creates a module with all the router directives and a provider registering routes.\n * @param {?} routes\n * @return {?}\n */\nstatic forChild(routes: Routes): ModuleWithProviders {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD, ] }, ]},\n];\n}\n\nfunction RouterModule_tsickle_Closure_declarations() {\n/** @type {?} */\nRouterModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRouterModule.ctorParameters;\n}\n\n/**\n * @param {?} platformLocationStrategy\n * @param {?} baseHref\n * @param {?=} options\n * @return {?}\n */\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n/**\n * @param {?} router\n * @return {?}\n */\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n/**\n * \\@whatItDoes Registers routes.\n * \n * \\@howToUse \n * \n * ```\n * \\@NgModule({ \n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n * \n * \\@stable\n * @param {?} routes\n * @return {?}\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @whatItDoes Represents an option to configure when the initial navigation is performed.\n *\n * @description\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated\n * * `false` - same as 'legacy_disabled'. @deprecated\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @experimental\n */\nexport type InitialNavigation =\n boolean | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @whatItDoes Represents options to configure the router.\n *\n * @stable\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See {@link PreloadAllModules}.\n */\n preloadingStrategy?: any;\n}\n/**\n * @param {?} ref\n * @param {?} urlSerializer\n * @param {?} outletMap\n * @param {?} location\n * @param {?} injector\n * @param {?} loader\n * @param {?} compiler\n * @param {?} config\n * @param {?=} opts\n * @param {?=} urlHandlingStrategy\n * @param {?=} routeReuseStrategy\n * @return {?}\n */\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, outletMap: RouterOutletMap,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const /** @type {?} */ router = new Router(\n null, urlSerializer, outletMap, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.enableTracing) {\n const /** @type {?} */ dom = getDOM();\n router.events.subscribe(e => {\n dom.logGroup(`Router Event: ${( /** @type {?} */((<any>e.constructor))).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n return router;\n}\n/**\n * @param {?} router\n * @return {?}\n */\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n/**\n * To initialize the router properly we need to do in two steps:\n * \n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n * \n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\nexport class RouterInitializer {\nprivate initNavigation: boolean = false;\nprivate resultOfPreactivationDone = new Subject<void>();\n/**\n * @param {?} injector\n */\nconstructor(private injector: Injector) {}\n/**\n * @return {?}\n */\nappInitializer(): Promise<any> {\n const /** @type {?} */ p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let /** @type {?} */ resolve: Function = null;\n const /** @type {?} */ res = new Promise(r => resolve = r);\n const /** @type {?} */ router = this.injector.get(Router);\n const /** @type {?} */ opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null);\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n/**\n * @param {?} bootstrappedComponentRef\n * @return {?}\n */\nbootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const /** @type {?} */ opts = this.injector.get(ROUTER_CONFIGURATION);\n const /** @type {?} */ preloader = this.injector.get(RouterPreloader);\n const /** @type {?} */ router = this.injector.get(Router);\n const /** @type {?} */ ref = this.injector.get(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null);\n this.resultOfPreactivationDone.complete();\n }\n/**\n * @param {?} opts\n * @return {?}\n */\nprivate isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n/**\n * @param {?} opts\n * @return {?}\n */\nprivate isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Injector, },\n];\n}\n\nfunction RouterInitializer_tsickle_Closure_declarations() {\n/** @type {?} */\nRouterInitializer.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRouterInitializer.ctorParameters;\n/** @type {?} */\nRouterInitializer.prototype.initNavigation;\n/** @type {?} */\nRouterInitializer.prototype.resultOfPreactivationDone;\n/** @type {?} */\nRouterInitializer.prototype.injector;\n}\n\n/**\n * @param {?} r\n * @return {?}\n */\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n/**\n * @param {?} r\n * @return {?}\n */\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @experimental\n */\nexport const /** @type {?} */ ROUTER_INITIALIZER = new OpaqueToken('Router Initializer');\n/**\n * @return {?}\n */\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":3,"metadata":{"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_FORROOT_GUARD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_FORROOT_GUARD"]},"ROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"provide":{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","module":"./url_tree","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","module":"./router","name":"Router"},"useFactory":{"__symbolic":"reference","name":"setupRouter"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},{"__symbolic":"reference","module":"@angular/core","name":"Compiler"},{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","module":"./url_handling_strategy","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"reference","module":"./route_reuse_strategy","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]]},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"provide":{"__symbolic":"reference","module":"./router_state","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"rootRoute"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader"}},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"},{"__symbolic":"reference","module":"./router_preloader","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"routerNgProbeToken":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"arguments":["Router",{"__symbolic":"reference","module":"./router","name":"Router"}]}},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}],"exports":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"},"useFactory":{"__symbolic":"reference","name":"provideForRootGuard"},"deps":[[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"},"useFactory":{"__symbolic":"reference","name":"provideLocationStrategy"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF"}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"./router_preloader","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"multi":true,"useFactory":{"__symbolic":"reference","name":"routerNgProbeToken"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRouterInitializer"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideLocationStrategy":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}},"defaults":[null,null,{}]},"provideForRootGuard":{"__symbolic":"function"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"setupRouter":{"__symbolic":"function"},"rootRoute":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"initialRouterNavigation":{"__symbolic":"function","parameters":["router","ref","preloader","opts"],"value":{"__symbolic":"error","message":"Function call not supported","line":282,"character":9}},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["Router Initializer"]},"provideRouterInitializer":{"__symbolic":"function","parameters":[],"value":[{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"initialRouterNavigation"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]}}},{"__symbolic":"module","version":1,"metadata":{"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_FORROOT_GUARD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_FORROOT_GUARD"]},"ROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"provide":{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","module":"./url_tree","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","module":"./router","name":"Router"},"useFactory":{"__symbolic":"reference","name":"setupRouter"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},{"__symbolic":"reference","module":"@angular/core","name":"Compiler"},{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","module":"./url_handling_strategy","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"reference","module":"./route_reuse_strategy","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]]},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"provide":{"__symbolic":"reference","module":"./router_state","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"rootRoute"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader"}},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"},{"__symbolic":"reference","module":"./router_preloader","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"routerNgProbeToken":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"arguments":["Router",{"__symbolic":"reference","module":"./router","name":"Router"}]}},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}],"exports":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"},"useFactory":{"__symbolic":"reference","name":"provideForRootGuard"},"deps":[[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"},"useFactory":{"__symbolic":"reference","name":"provideLocationStrategy"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF"}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"./router_preloader","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"multi":true,"useFactory":{"__symbolic":"reference","name":"routerNgProbeToken"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRouterInitializer"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideLocationStrategy":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}},"defaults":[null,null,{}]},"provideForRootGuard":{"__symbolic":"function"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"setupRouter":{"__symbolic":"function"},"rootRoute":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"initialRouterNavigation":{"__symbolic":"function","parameters":["router","ref","preloader","opts"],"value":{"__symbolic":"error","message":"Function call not supported","line":282,"character":9}},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["Router Initializer"]},"provideRouterInitializer":{"__symbolic":"function","parameters":[],"value":[{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"initialRouterNavigation"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]}}}]
1
+ [{"__symbolic":"module","version":3,"metadata":{"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_FORROOT_GUARD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_FORROOT_GUARD"]},"ROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"provide":{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","module":"./url_tree","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","module":"./router","name":"Router"},"useFactory":{"__symbolic":"reference","name":"setupRouter"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},{"__symbolic":"reference","module":"@angular/core","name":"Compiler"},{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","module":"./url_handling_strategy","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"reference","module":"./route_reuse_strategy","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]]},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"provide":{"__symbolic":"reference","module":"./router_state","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"rootRoute"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader"}},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"},{"__symbolic":"reference","module":"./router_preloader","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"routerNgProbeToken":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"arguments":["Router",{"__symbolic":"reference","module":"./router","name":"Router"}]}},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}],"exports":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"},"useFactory":{"__symbolic":"reference","name":"provideForRootGuard"},"deps":[[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"},"useFactory":{"__symbolic":"reference","name":"provideLocationStrategy"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF"}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"./router_preloader","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"multi":true,"useFactory":{"__symbolic":"reference","name":"routerNgProbeToken"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRouterInitializer"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideLocationStrategy":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}},"defaults":[null,null,{}]},"provideForRootGuard":{"__symbolic":"function"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"setupRouter":{"__symbolic":"function"},"rootRoute":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"RouterInitializer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"isLegacyEnabled":[{"__symbolic":"method"}],"isLegacyDisabled":[{"__symbolic":"method"}]}},"getAppInitializer":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"getBootstrapListener":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["Router Initializer"]},"provideRouterInitializer":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"RouterInitializer"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"getAppInitializer"},"deps":[{"__symbolic":"reference","name":"RouterInitializer"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"getBootstrapListener"},"deps":[{"__symbolic":"reference","name":"RouterInitializer"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]}}},{"__symbolic":"module","version":1,"metadata":{"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_FORROOT_GUARD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ROUTER_FORROOT_GUARD"]},"ROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"provide":{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","module":"./url_tree","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","module":"./router","name":"Router"},"useFactory":{"__symbolic":"reference","name":"setupRouter"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSerializer"},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},{"__symbolic":"reference","module":"@angular/core","name":"Compiler"},{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","module":"./url_handling_strategy","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"reference","module":"./route_reuse_strategy","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]]},{"__symbolic":"reference","module":"./router_outlet_map","name":"RouterOutletMap"},{"provide":{"__symbolic":"reference","module":"./router_state","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"rootRoute"},"deps":[{"__symbolic":"reference","module":"./router","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader"},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader"}},{"__symbolic":"reference","module":"./router_preloader","name":"RouterPreloader"},{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"},{"__symbolic":"reference","module":"./router_preloader","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"routerNgProbeToken":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"arguments":["Router",{"__symbolic":"reference","module":"./router","name":"Router"}]}},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}],"exports":[{"__symbolic":"reference","module":"./directives/router_outlet","name":"RouterOutlet"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLink"},{"__symbolic":"reference","module":"./directives/router_link","name":"RouterLinkWithHref"},{"__symbolic":"reference","module":"./directives/router_link_active","name":"RouterLinkActive"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_FORROOT_GUARD"},"useFactory":{"__symbolic":"reference","name":"provideForRootGuard"},"deps":[[{"__symbolic":"reference","module":"./router","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"},"useFactory":{"__symbolic":"reference","name":"provideLocationStrategy"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF"}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","module":"./router_preloader","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","module":"./router_preloader","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken"},"multi":true,"useFactory":{"__symbolic":"reference","name":"routerNgProbeToken"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRouterInitializer"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideLocationStrategy":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy"},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}},"defaults":[null,null,{}]},"provideForRootGuard":{"__symbolic":"function"},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","module":"./router_config_loader","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"setupRouter":{"__symbolic":"function"},"rootRoute":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"RouterInitializer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"isLegacyEnabled":[{"__symbolic":"method"}],"isLegacyDisabled":[{"__symbolic":"method"}]}},"getAppInitializer":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"getBootstrapListener":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["Router Initializer"]},"provideRouterInitializer":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"RouterInitializer"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"getAppInitializer"},"deps":[{"__symbolic":"reference","name":"RouterInitializer"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"getBootstrapListener"},"deps":[{"__symbolic":"reference","name":"RouterInitializer"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]}}}]
@@ -129,7 +129,7 @@ export var RouterPreloader = (function () {
129
129
  var /** @type {?} */ res = [];
130
130
  for (var _i = 0, routes_1 = routes; _i < routes_1.length; _i++) {
131
131
  var c = routes_1[_i];
132
- // we already have the config loaded, just recurce
132
+ // we already have the config loaded, just recurse
133
133
  if (c.loadChildren && !c.canLoad && ((c))._loadedConfig) {
134
134
  var /** @type {?} */ childConfig = ((c))._loadedConfig;
135
135
  res.push(this.processRoutes(childConfig.injector, childConfig.routes));
@@ -1 +1 @@
1
- {"version":3,"file":"router_preloader.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/router_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L,CAAC,CAAC,CAAC;IACL,CAAC;IACI,0BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,8BAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,MAAM,GAAG;QAChB,EAAC,IAAI,EAAE,qBAAqB,GAAG;QAC/B,EAAC,IAAI,EAAE,QAAQ,GAAG;QAClB,EAAC,IAAI,EAAE,QAAQ,GAAG;QAClB,EAAC,IAAI,EAAE,kBAAkB,GAAG;KAC3B,EAN6F,CAM7F,CAAC;IACF,sBAAC;AAAD,CAAC,AAjFD,IAiFC;AAED;IACA,gBAAgB;IAChB,eAAe,CAAC,UAAU,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,cAAc,CAAC;IAC/B,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;IACjC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,YAAY,CAAC;IACvC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;IACjC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC;IACnC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,kBAAkB,CAAC;AAC7C,CAAC","sourcesContent":["/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subscription} from 'rxjs/Subscription';\nimport {from} from 'rxjs/observable/from';\nimport {of } from 'rxjs/observable/of';\nimport {_catch} from 'rxjs/operator/catch';\nimport {concatMap} from 'rxjs/operator/concatMap';\nimport {filter} from 'rxjs/operator/filter';\nimport {mergeAll} from 'rxjs/operator/mergeAll';\nimport {mergeMap} from 'rxjs/operator/mergeMap';\n\nimport {Route, Routes} from './config';\nimport {NavigationEnd, Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n/**\n * \\@whatItDoes Provides a preloading strategy.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class PreloadingStrategy {\n/**\n * @abstract\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>) {}\n}\n/**\n * \\@whatItDoes Provides a preloading strategy that preloads all modules as quicky as possible.\n * \n * \\@howToUse \n * \n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n * \n * \\@experimental\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n/**\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>): Observable<any> {\n return _catch.call(fn(), () => of (null));\n }\n}\n/**\n * \\@whatItDoes Provides a preloading strategy that does not preload any modules.\n * \n * \\@description \n * \n * This strategy is enabled by default.\n * \n * \\@experimental\n */\nexport class NoPreloading implements PreloadingStrategy {\n/**\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n * \n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n * \n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n * \n * \\@stable\n */\nexport class RouterPreloader {\nprivate loader: RouterConfigLoader;\nprivate subscription: Subscription;\n/**\n * @param {?} router\n * @param {?} moduleLoader\n * @param {?} compiler\n * @param {?} injector\n * @param {?} preloadingStrategy\n */\nconstructor(\nprivate router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\nprivate injector: Injector,\nprivate preloadingStrategy: PreloadingStrategy) {\n this.loader = new RouterConfigLoader(moduleLoader, compiler);\n };\n/**\n * @return {?}\n */\nsetUpPreloading(): void {\n const /** @type {?} */ navigations = filter.call(this.router.events, (e: any) => e instanceof NavigationEnd);\n this.subscription = concatMap.call(navigations, () => this.preload()).subscribe((v: any) => {});\n }\n/**\n * @return {?}\n */\npreload(): Observable<any> { return this.processRoutes(this.injector, this.router.config); }\n/**\n * @return {?}\n */\nngOnDestroy() { this.subscription.unsubscribe(); }\n/**\n * @param {?} injector\n * @param {?} routes\n * @return {?}\n */\nprivate processRoutes(injector: Injector, routes: Routes): Observable<void> {\n const /** @type {?} */ res: Observable<any>[] = [];\n for (const /** @type {?} */ c of routes) {\n // we already have the config loaded, just recurce\n if (c.loadChildren && !c.canLoad && ( /** @type {?} */((<any>c)))._loadedConfig) {\n const /** @type {?} */ childConfig = ( /** @type {?} */((<any>c)))._loadedConfig;\n res.push(this.processRoutes(childConfig.injector, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (c.loadChildren && !c.canLoad) {\n res.push(this.preloadConfig(injector, c));\n\n // recurse into children\n } else if (c.children) {\n res.push(this.processRoutes(injector, c.children));\n }\n }\n return mergeAll.call(from(res));\n }\n/**\n * @param {?} injector\n * @param {?} route\n * @return {?}\n */\nprivate preloadConfig(injector: Injector, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const /** @type {?} */ loaded = this.loader.load(injector, route.loadChildren);\n return mergeMap.call(loaded, (config: any): any => {\n const /** @type {?} */ c: any = route;\n c._loadedConfig = config;\n return this.processRoutes(config.injector, config.routes);\n });\n });\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Router, },\n{type: NgModuleFactoryLoader, },\n{type: Compiler, },\n{type: Injector, },\n{type: PreloadingStrategy, },\n];\n}\n\nfunction RouterPreloader_tsickle_Closure_declarations() {\n/** @type {?} */\nRouterPreloader.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRouterPreloader.ctorParameters;\n/** @type {?} */\nRouterPreloader.prototype.loader;\n/** @type {?} */\nRouterPreloader.prototype.subscription;\n/** @type {?} */\nRouterPreloader.prototype.router;\n/** @type {?} */\nRouterPreloader.prototype.injector;\n/** @type {?} */\nRouterPreloader.prototype.preloadingStrategy;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"file":"router_preloader.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/router_preloader.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;OAEK,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,qBAAqB,EAAC,MAAM,eAAe;OAG5E,EAAC,IAAI,EAAC,MAAM,sBAAsB;OAClC,EAAC,EAAE,EAAE,MAAM,oBAAoB;OAC/B,EAAC,MAAM,EAAC,MAAM,qBAAqB;OACnC,EAAC,SAAS,EAAC,MAAM,yBAAyB;OAC1C,EAAC,MAAM,EAAC,MAAM,sBAAsB;OACpC,EAAC,QAAQ,EAAC,MAAM,wBAAwB;OACxC,EAAC,QAAQ,EAAC,MAAM,wBAAwB;OAGxC,EAAC,aAAa,EAAE,MAAM,EAAC,MAAM,UAAU;OACvC,EAAC,kBAAkB,EAAC,MAAM,wBAAwB;AACzD;;;;;GAKG;AACH;IAAA;IAQA,CAAC;IAPD;;;;;OAKG;IACH,oCAAO,GAAP,UAAQ,KAAY,EAAE,EAAyB,IAAG,CAAC;IACnD,yBAAC;AAAD,CAAC,AARD,IAQC;AACD;;;;;;;;;;GAUG;AACH;IAAA;IASA,CAAC;IARD;;;;OAIG;IACH,mCAAO,GAAP,UAAQ,KAAY,EAAE,EAAyB;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,cAAM,OAAA,EAAE,CAAE,IAAI,CAAC,EAAT,CAAS,CAAC,CAAC;IAC5C,CAAC;IACH,wBAAC;AAAD,CAAC,AATD,IASC;AACD;;;;;;;;GAQG;AACH;IAAA;IAOA,CAAC;IAND;;;;OAIG;IACH,8BAAO,GAAP,UAAQ,KAAY,E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EAAE,UAAC,MAAW;gBACvC,IAAM,gBAAgB,CAAC,CAAC,GAAQ,KAAK,CAAC;gBACtC,CAAC,CAAC,aAAa,GAAG,MAAM,CAAC;gBACzB,MAAM,CAAC,KAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5D,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACI,0BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,8BAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,MAAM,GAAG;QAChB,EAAC,IAAI,EAAE,qBAAqB,GAAG;QAC/B,EAAC,IAAI,EAAE,QAAQ,GAAG;QAClB,EAAC,IAAI,EAAE,QAAQ,GAAG;QAClB,EAAC,IAAI,EAAE,kBAAkB,GAAG;KAC3B,EAN6F,CAM7F,CAAC;IACF,sBAAC;AAAD,CAAC,AAjFD,IAiFC;AAED;IACA,gBAAgB;IAChB,eAAe,CAAC,UAAU,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,cAAc,CAAC;IAC/B,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;IACjC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,YAAY,CAAC;IACvC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;IACjC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC;IACnC,gBAAgB;IAChB,eAAe,CAAC,SAAS,CAAC,kBAAkB,CAAC;AAC7C,CAAC","sourcesContent":["/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subscription} from 'rxjs/Subscription';\nimport {from} from 'rxjs/observable/from';\nimport {of } from 'rxjs/observable/of';\nimport {_catch} from 'rxjs/operator/catch';\nimport {concatMap} from 'rxjs/operator/concatMap';\nimport {filter} from 'rxjs/operator/filter';\nimport {mergeAll} from 'rxjs/operator/mergeAll';\nimport {mergeMap} from 'rxjs/operator/mergeMap';\n\nimport {Route, Routes} from './config';\nimport {NavigationEnd, Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n/**\n * \\@whatItDoes Provides a preloading strategy.\n * \n * \\@experimental\n * @abstract\n */\nexport abstract class PreloadingStrategy {\n/**\n * @abstract\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>) {}\n}\n/**\n * \\@whatItDoes Provides a preloading strategy that preloads all modules as quicky as possible.\n * \n * \\@howToUse \n * \n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n * \n * \\@experimental\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n/**\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>): Observable<any> {\n return _catch.call(fn(), () => of (null));\n }\n}\n/**\n * \\@whatItDoes Provides a preloading strategy that does not preload any modules.\n * \n * \\@description \n * \n * This strategy is enabled by default.\n * \n * \\@experimental\n */\nexport class NoPreloading implements PreloadingStrategy {\n/**\n * @param {?} route\n * @param {?} fn\n * @return {?}\n */\npreload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n * \n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n * \n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n * \n * \\@stable\n */\nexport class RouterPreloader {\nprivate loader: RouterConfigLoader;\nprivate subscription: Subscription;\n/**\n * @param {?} router\n * @param {?} moduleLoader\n * @param {?} compiler\n * @param {?} injector\n * @param {?} preloadingStrategy\n */\nconstructor(\nprivate router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\nprivate injector: Injector,\nprivate preloadingStrategy: PreloadingStrategy) {\n this.loader = new RouterConfigLoader(moduleLoader, compiler);\n };\n/**\n * @return {?}\n */\nsetUpPreloading(): void {\n const /** @type {?} */ navigations = filter.call(this.router.events, (e: any) => e instanceof NavigationEnd);\n this.subscription = concatMap.call(navigations, () => this.preload()).subscribe((v: any) => {});\n }\n/**\n * @return {?}\n */\npreload(): Observable<any> { return this.processRoutes(this.injector, this.router.config); }\n/**\n * @return {?}\n */\nngOnDestroy() { this.subscription.unsubscribe(); }\n/**\n * @param {?} injector\n * @param {?} routes\n * @return {?}\n */\nprivate processRoutes(injector: Injector, routes: Routes): Observable<void> {\n const /** @type {?} */ res: Observable<any>[] = [];\n for (const /** @type {?} */ c of routes) {\n // we already have the config loaded, just recurse\n if (c.loadChildren && !c.canLoad && ( /** @type {?} */((<any>c)))._loadedConfig) {\n const /** @type {?} */ childConfig = ( /** @type {?} */((<any>c)))._loadedConfig;\n res.push(this.processRoutes(childConfig.injector, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (c.loadChildren && !c.canLoad) {\n res.push(this.preloadConfig(injector, c));\n\n // recurse into children\n } else if (c.children) {\n res.push(this.processRoutes(injector, c.children));\n }\n }\n return mergeAll.call(from(res));\n }\n/**\n * @param {?} injector\n * @param {?} route\n * @return {?}\n */\nprivate preloadConfig(injector: Injector, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const /** @type {?} */ loaded = this.loader.load(injector, route.loadChildren);\n return mergeMap.call(loaded, (config: any): any => {\n const /** @type {?} */ c: any = route;\n c._loadedConfig = config;\n return this.processRoutes(config.injector, config.routes);\n });\n });\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Router, },\n{type: NgModuleFactoryLoader, },\n{type: Compiler, },\n{type: Injector, },\n{type: PreloadingStrategy, },\n];\n}\n\nfunction RouterPreloader_tsickle_Closure_declarations() {\n/** @type {?} */\nRouterPreloader.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRouterPreloader.ctorParameters;\n/** @type {?} */\nRouterPreloader.prototype.loader;\n/** @type {?} */\nRouterPreloader.prototype.subscription;\n/** @type {?} */\nRouterPreloader.prototype.router;\n/** @type {?} */\nRouterPreloader.prototype.injector;\n/** @type {?} */\nRouterPreloader.prototype.preloadingStrategy;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
package/src/version.js CHANGED
@@ -9,5 +9,5 @@ import { Version } from '@angular/core';
9
9
  /**
10
10
  * @stable
11
11
  */
12
- export var /** @type {?} */ VERSION = new Version('3.4.6');
12
+ export var /** @type {?} */ VERSION = new Version('3.4.10');
13
13
  //# sourceMappingURL=version.js.map