@angular/router 3.4.9 → 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.
- package/bundles/router-testing.umd.js +1 -1
- package/bundles/router-upgrade.umd.js +11 -22
- package/bundles/router-upgrade.umd.min.js +2 -2
- package/bundles/router.umd.js +146 -22
- package/bundles/router.umd.min.js +4 -4
- package/package.json +4 -4
- package/src/router.d.ts +1 -1
- package/src/router.js +36 -4
- package/src/router.js.map +1 -1
- package/src/router_module.d.ts +57 -6
- package/src/router_module.js +135 -18
- package/src/router_module.js.map +1 -1
- package/src/router_module.metadata.json +1 -1
- package/src/version.js +1 -1
- package/src/version.js.map +1 -1
- package/src/version.metadata.json +1 -1
- package/upgrade.d.ts +4 -4
- package/upgrade.js +11 -22
- package/upgrade.js.map +1 -1
- package/upgrade.metadata.json +1 -1
package/src/router_module.js
CHANGED
|
@@ -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
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
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
|
|
285
|
-
|
|
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
|
-
|
|
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:
|
|
312
|
-
|
|
313
|
-
|
|
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
|
}
|
package/src/router_module.js.map
CHANGED
|
@@ -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,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,2BAA2B,EAAE,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,OAAO,IAAM,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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* @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"}}]}}}]
|
package/src/version.js
CHANGED
package/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAQI,EAAC,OAAO,EAAC,MAAM,eAAe;AACrC;;GAEG;AACH,OAAO,IAAM,gBAAgB,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,yBAAyB,CAAC,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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @stable\n */\nexport const /** @type {?} */ VERSION = new Version('3.4.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAQI,EAAC,OAAO,EAAC,MAAM,eAAe;AACrC;;GAEG;AACH,OAAO,IAAM,gBAAgB,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,yBAAyB,CAAC,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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @stable\n */\nexport const /** @type {?} */ VERSION = new Version('3.4.10');\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.
|
|
1
|
+
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.10"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.10"]}}}]
|
package/upgrade.d.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
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 {
|
|
9
|
-
import { ExtraOptions, RouterPreloader } from '@angular/router';
|
|
8
|
+
import { OpaqueToken } from '@angular/core';
|
|
10
9
|
import { UpgradeModule } from '@angular/upgrade/static';
|
|
11
10
|
/**
|
|
12
11
|
* @whatItDoes Creates an initializer that in addition to setting up the Angular 2
|
|
@@ -33,8 +32,9 @@ import { UpgradeModule } from '@angular/upgrade/static';
|
|
|
33
32
|
*/
|
|
34
33
|
export declare const RouterUpgradeInitializer: {
|
|
35
34
|
provide: OpaqueToken;
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
multi: boolean;
|
|
36
|
+
useFactory: (ngUpgrade: UpgradeModule) => () => void;
|
|
37
|
+
deps: typeof UpgradeModule[];
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
40
|
* @whatItDoes Sets up a location synchronization.
|
package/upgrade.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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 {
|
|
9
|
-
import {
|
|
8
|
+
import { APP_BOOTSTRAP_LISTENER } from '@angular/core';
|
|
9
|
+
import { Router } from '@angular/router';
|
|
10
10
|
import { UpgradeModule } from '@angular/upgrade/static';
|
|
11
11
|
/**
|
|
12
12
|
* @whatItDoes Creates an initializer that in addition to setting up the Angular 2
|
|
@@ -32,30 +32,16 @@ import { UpgradeModule } from '@angular/upgrade/static';
|
|
|
32
32
|
* @experimental
|
|
33
33
|
*/
|
|
34
34
|
export var RouterUpgradeInitializer = {
|
|
35
|
-
provide:
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
provide: APP_BOOTSTRAP_LISTENER,
|
|
36
|
+
multi: true,
|
|
37
|
+
useFactory: locationSyncBootstrapListener,
|
|
38
|
+
deps: [UpgradeModule]
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
41
|
* @internal
|
|
41
42
|
*/
|
|
42
|
-
export function
|
|
43
|
-
return function () {
|
|
44
|
-
if (!ngUpgrade.$injector) {
|
|
45
|
-
throw new Error("\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n ");
|
|
46
|
-
}
|
|
47
|
-
var router = ngUpgrade.injector.get(Router);
|
|
48
|
-
var ref = ngUpgrade.injector.get(ApplicationRef);
|
|
49
|
-
router.resetRootComponentType(ref.componentTypes[0]);
|
|
50
|
-
preloader.setUpPreloading();
|
|
51
|
-
if (opts.initialNavigation === false) {
|
|
52
|
-
router.setUpLocationChangeListener();
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
router.initialNavigation();
|
|
56
|
-
}
|
|
57
|
-
setUpLocationSync(ngUpgrade);
|
|
58
|
-
};
|
|
43
|
+
export function locationSyncBootstrapListener(ngUpgrade) {
|
|
44
|
+
return function () { setUpLocationSync(ngUpgrade); };
|
|
59
45
|
}
|
|
60
46
|
/**
|
|
61
47
|
* @whatItDoes Sets up a location synchronization.
|
|
@@ -66,6 +52,9 @@ export function initialRouterNavigation(ngUpgrade, ref, preloader, opts) {
|
|
|
66
52
|
* @experimental
|
|
67
53
|
*/
|
|
68
54
|
export function setUpLocationSync(ngUpgrade) {
|
|
55
|
+
if (!ngUpgrade.$injector) {
|
|
56
|
+
throw new Error("\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n ");
|
|
57
|
+
}
|
|
69
58
|
var router = ngUpgrade.injector.get(Router);
|
|
70
59
|
var url = document.createElement('a');
|
|
71
60
|
ngUpgrade.$injector.get('$rootScope')
|
package/upgrade.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../modules/@angular/router/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../modules/@angular/router/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,sBAAsB,EAA4B,MAAM,eAAe;OACxE,EAAC,MAAM,EAAC,MAAM,iBAAiB;OAC/B,EAAC,aAAa,EAAC,MAAM,yBAAyB;AAGrD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,IAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,sBAAsB;IAC/B,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,6BAA6B;IACzC,IAAI,EAAE,CAAC,aAAa,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,8CAA8C,SAAwB;IACpE,MAAM,CAAC,cAAQ,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,kCAAkC,SAAwB;IACxD,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+MAGb,CAAC,CAAC;IACP,CAAC;IAED,IAAM,MAAM,GAAW,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAExC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;SAChC,GAAG,CAAC,sBAAsB,EAAE,UAAC,CAAM,EAAE,IAAY,EAAE,EAAU;QAC5D,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;QAChB,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACT,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_BOOTSTRAP_LISTENER, ComponentRef, OpaqueToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n\n/**\n * @whatItDoes Creates an initializer that in addition to setting up the Angular 2\n * router sets up the ngRoute integration.\n *\n * @howToUse\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @experimental\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @whatItDoes Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the angular2 location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @experimental\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule) {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const url = document.createElement('a');\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n url.href = next;\n router.navigateByUrl(url.pathname);\n });\n}\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/upgrade.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/
|
|
1
|
+
[{"__symbolic":"module","version":3,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"locationSyncBootstrapListener"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"}]},"locationSyncBootstrapListener":{"__symbolic":"function","parameters":["ngUpgrade"],"value":{"__symbolic":"error","message":"Function call not supported","line":47,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"locationSyncBootstrapListener"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"}]},"locationSyncBootstrapListener":{"__symbolic":"function","parameters":["ngUpgrade"],"value":{"__symbolic":"error","message":"Function call not supported","line":47,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}}]
|