@angular/router 13.0.0-next.7 → 13.0.0-rc.1
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/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/router.mjs +5 -0
- package/{esm2015/src/apply_redirects.js → esm2020/src/apply_redirects.mjs} +0 -0
- package/esm2020/src/components/empty_outlet.mjs +29 -0
- package/esm2020/src/config.mjs +14 -0
- package/{esm2015/src/create_router_state.js → esm2020/src/create_router_state.mjs} +0 -0
- package/{esm2015/src/create_url_tree.js → esm2020/src/create_url_tree.mjs} +0 -0
- package/esm2020/src/directives/router_link.mjs +353 -0
- package/esm2020/src/directives/router_link_active.mjs +215 -0
- package/esm2020/src/directives/router_outlet.mjs +219 -0
- package/{esm2015/src/events.js → esm2020/src/events.mjs} +1 -1
- package/{esm2015/src/index.js → esm2020/src/index.mjs} +1 -1
- package/{esm2015/src/interfaces.js → esm2020/src/interfaces.mjs} +1 -1
- package/{esm2015/src/operators/activate_routes.js → esm2020/src/operators/activate_routes.mjs} +0 -0
- package/esm2020/src/operators/apply_redirects.mjs +14 -0
- package/esm2020/src/operators/check_guards.mjs +138 -0
- package/{esm2015/src/operators/prioritized_guard_value.js → esm2020/src/operators/prioritized_guard_value.mjs} +0 -0
- package/esm2020/src/operators/recognize.mjs +14 -0
- package/esm2020/src/operators/resolve_data.mjs +59 -0
- package/{esm2015/src/operators/switch_tap.js → esm2020/src/operators/switch_tap.mjs} +0 -0
- package/{esm2015/src/private_export.js → esm2020/src/private_export.mjs} +0 -0
- package/esm2020/src/recognize.mjs +262 -0
- package/{esm2015/src/route_reuse_strategy.js → esm2020/src/route_reuse_strategy.mjs} +0 -0
- package/esm2020/src/router.mjs +1002 -0
- package/esm2020/src/router_config_loader.mjs +71 -0
- package/esm2020/src/router_module.mjs +370 -0
- package/esm2020/src/router_outlet_context.mjs +74 -0
- package/esm2020/src/router_preloader.mjs +127 -0
- package/esm2020/src/router_scroller.mjs +95 -0
- package/esm2020/src/router_state.mjs +404 -0
- package/{esm2015/src/shared.js → esm2020/src/shared.mjs} +0 -0
- package/{esm2015/src/url_handling_strategy.js → esm2020/src/url_handling_strategy.mjs} +0 -0
- package/{esm2015/src/url_tree.js → esm2020/src/url_tree.mjs} +0 -0
- package/{esm2015/src/utils/collection.js → esm2020/src/utils/collection.mjs} +0 -0
- package/{esm2015/src/utils/config.js → esm2020/src/utils/config.mjs} +2 -2
- package/esm2020/src/utils/config_matching.mjs +145 -0
- package/{esm2015/src/utils/preactivation.js → esm2020/src/utils/preactivation.mjs} +0 -0
- package/{esm2015/src/utils/tree.js → esm2020/src/utils/tree.mjs} +0 -0
- package/{esm2015/src/utils/type_guards.js → esm2020/src/utils/type_guards.mjs} +0 -0
- package/{esm2015/src/version.js → esm2020/src/version.mjs} +1 -1
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
- package/esm2020/testing/src/extra_router_testing_providers.mjs +10 -0
- package/esm2020/testing/src/router_testing_module.mjs +122 -0
- package/esm2020/testing/src/spy_ng_module_factory_loader.mjs +10 -0
- package/esm2020/testing/src/testing.mjs +15 -0
- package/{esm2015/testing/testing.js → esm2020/testing/testing.mjs} +0 -0
- package/{esm2015/upgrade/index.js → esm2020/upgrade/index.mjs} +0 -0
- package/{esm2015/upgrade/public_api.js → esm2020/upgrade/public_api.mjs} +0 -0
- package/esm2020/upgrade/src/upgrade.mjs +120 -0
- package/{esm2015/upgrade/upgrade.js → esm2020/upgrade/upgrade.mjs} +0 -0
- package/fesm2015/{router.js → router.mjs} +532 -517
- package/fesm2015/router.mjs.map +1 -0
- package/fesm2015/testing.mjs +179 -0
- package/fesm2015/testing.mjs.map +1 -0
- package/fesm2015/{upgrade.js → upgrade.mjs} +4 -5
- package/fesm2015/upgrade.mjs.map +1 -0
- package/fesm2020/router.mjs +6159 -0
- package/fesm2020/router.mjs.map +1 -0
- package/fesm2020/testing.mjs +179 -0
- package/fesm2020/testing.mjs.map +1 -0
- package/fesm2020/upgrade.mjs +150 -0
- package/fesm2020/upgrade.mjs.map +1 -0
- package/package.json +42 -12
- package/router.d.ts +118 -118
- package/testing/package.json +5 -5
- package/testing/testing.d.ts +9 -66
- package/upgrade/package.json +5 -5
- package/upgrade/upgrade.d.ts +1 -1
- package/bundles/router-testing.umd.js +0 -541
- package/bundles/router-testing.umd.js.map +0 -1
- package/bundles/router-upgrade.umd.js +0 -157
- package/bundles/router-upgrade.umd.js.map +0 -1
- package/bundles/router.umd.js +0 -6867
- package/bundles/router.umd.js.map +0 -1
- package/esm2015/router.externs.js +0 -6
- package/esm2015/router.js +0 -9
- package/esm2015/src/components/empty_outlet.js +0 -24
- package/esm2015/src/config.js +0 -14
- package/esm2015/src/directives/router_link.js +0 -328
- package/esm2015/src/directives/router_link_active.js +0 -210
- package/esm2015/src/directives/router_outlet.js +0 -193
- package/esm2015/src/operators/apply_redirects.js +0 -14
- package/esm2015/src/operators/check_guards.js +0 -138
- package/esm2015/src/operators/recognize.js +0 -14
- package/esm2015/src/operators/resolve_data.js +0 -56
- package/esm2015/src/recognize.js +0 -262
- package/esm2015/src/router.js +0 -1012
- package/esm2015/src/router_config_loader.js +0 -76
- package/esm2015/src/router_module.js +0 -363
- package/esm2015/src/router_outlet_context.js +0 -73
- package/esm2015/src/router_preloader.js +0 -130
- package/esm2015/src/router_scroller.js +0 -95
- package/esm2015/src/router_state.js +0 -404
- package/esm2015/src/utils/config_matching.js +0 -145
- package/esm2015/testing/src/router_testing_module.js +0 -166
- package/esm2015/testing/src/testing.js +0 -14
- package/esm2015/testing/testing.externs.js +0 -6
- package/esm2015/upgrade/src/upgrade.js +0 -122
- package/esm2015/upgrade/upgrade.externs.js +0 -6
- package/fesm2015/router.js.map +0 -1
- package/fesm2015/testing.js +0 -204
- package/fesm2015/testing.js.map +0 -1
- package/fesm2015/upgrade.js.map +0 -1
- package/router.metadata.json +0 -1
- package/testing/testing.metadata.json +0 -1
- package/testing.d.ts +0 -7
- package/testing.metadata.json +0 -1
- package/upgrade/upgrade.metadata.json +0 -1
- package/upgrade.d.ts +0 -7
- package/upgrade.metadata.json +0 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.0.0-
|
|
2
|
+
* @license Angular v13.0.0-rc.1
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import { ɵisObservable, ɵisPromise, Component, NgModuleRef, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, Injectable,
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { ɵisObservable, ɵisPromise, EventEmitter, Directive, Attribute, Output, Component, NgModuleRef, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, Injectable, Input, HostListener, HostBinding, Optional, ContentChildren, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';
|
|
9
9
|
import { from, of, BehaviorSubject, combineLatest, Observable, EmptyError, concat, defer, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
10
10
|
import { map, switchMap, take, startWith, scan, filter, catchError, concatMap, last as last$1, first, mergeMap, tap, takeLast, refCount, finalize, mergeAll } from 'rxjs/operators';
|
|
11
|
+
import * as i3 from '@angular/common';
|
|
12
|
+
import { Location, LocationStrategy, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* @license
|
|
@@ -2280,6 +2282,295 @@ function prioritizedGuardValue() {
|
|
|
2280
2282
|
});
|
|
2281
2283
|
}
|
|
2282
2284
|
|
|
2285
|
+
/**
|
|
2286
|
+
* @license
|
|
2287
|
+
* Copyright Google LLC All Rights Reserved.
|
|
2288
|
+
*
|
|
2289
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
2290
|
+
* found in the LICENSE file at https://angular.io/license
|
|
2291
|
+
*/
|
|
2292
|
+
/**
|
|
2293
|
+
* Store contextual information about a `RouterOutlet`
|
|
2294
|
+
*
|
|
2295
|
+
* @publicApi
|
|
2296
|
+
*/
|
|
2297
|
+
class OutletContext {
|
|
2298
|
+
constructor() {
|
|
2299
|
+
this.outlet = null;
|
|
2300
|
+
this.route = null;
|
|
2301
|
+
this.resolver = null;
|
|
2302
|
+
this.children = new ChildrenOutletContexts();
|
|
2303
|
+
this.attachRef = null;
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
/**
|
|
2307
|
+
* Store contextual information about the children (= nested) `RouterOutlet`
|
|
2308
|
+
*
|
|
2309
|
+
* @publicApi
|
|
2310
|
+
*/
|
|
2311
|
+
class ChildrenOutletContexts {
|
|
2312
|
+
constructor() {
|
|
2313
|
+
// contexts for child outlets, by name.
|
|
2314
|
+
this.contexts = new Map();
|
|
2315
|
+
}
|
|
2316
|
+
/** Called when a `RouterOutlet` directive is instantiated */
|
|
2317
|
+
onChildOutletCreated(childName, outlet) {
|
|
2318
|
+
const context = this.getOrCreateContext(childName);
|
|
2319
|
+
context.outlet = outlet;
|
|
2320
|
+
this.contexts.set(childName, context);
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
* Called when a `RouterOutlet` directive is destroyed.
|
|
2324
|
+
* We need to keep the context as the outlet could be destroyed inside a NgIf and might be
|
|
2325
|
+
* re-created later.
|
|
2326
|
+
*/
|
|
2327
|
+
onChildOutletDestroyed(childName) {
|
|
2328
|
+
const context = this.getContext(childName);
|
|
2329
|
+
if (context) {
|
|
2330
|
+
context.outlet = null;
|
|
2331
|
+
context.attachRef = null;
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Called when the corresponding route is deactivated during navigation.
|
|
2336
|
+
* Because the component get destroyed, all children outlet are destroyed.
|
|
2337
|
+
*/
|
|
2338
|
+
onOutletDeactivated() {
|
|
2339
|
+
const contexts = this.contexts;
|
|
2340
|
+
this.contexts = new Map();
|
|
2341
|
+
return contexts;
|
|
2342
|
+
}
|
|
2343
|
+
onOutletReAttached(contexts) {
|
|
2344
|
+
this.contexts = contexts;
|
|
2345
|
+
}
|
|
2346
|
+
getOrCreateContext(childName) {
|
|
2347
|
+
let context = this.getContext(childName);
|
|
2348
|
+
if (!context) {
|
|
2349
|
+
context = new OutletContext();
|
|
2350
|
+
this.contexts.set(childName, context);
|
|
2351
|
+
}
|
|
2352
|
+
return context;
|
|
2353
|
+
}
|
|
2354
|
+
getContext(childName) {
|
|
2355
|
+
return this.contexts.get(childName) || null;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
/**
|
|
2360
|
+
* @license
|
|
2361
|
+
* Copyright Google LLC All Rights Reserved.
|
|
2362
|
+
*
|
|
2363
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
2364
|
+
* found in the LICENSE file at https://angular.io/license
|
|
2365
|
+
*/
|
|
2366
|
+
/**
|
|
2367
|
+
* @description
|
|
2368
|
+
*
|
|
2369
|
+
* Acts as a placeholder that Angular dynamically fills based on the current router state.
|
|
2370
|
+
*
|
|
2371
|
+
* Each outlet can have a unique name, determined by the optional `name` attribute.
|
|
2372
|
+
* The name cannot be set or changed dynamically. If not set, default value is "primary".
|
|
2373
|
+
*
|
|
2374
|
+
* ```
|
|
2375
|
+
* <router-outlet></router-outlet>
|
|
2376
|
+
* <router-outlet name='left'></router-outlet>
|
|
2377
|
+
* <router-outlet name='right'></router-outlet>
|
|
2378
|
+
* ```
|
|
2379
|
+
*
|
|
2380
|
+
* Named outlets can be the targets of secondary routes.
|
|
2381
|
+
* The `Route` object for a secondary route has an `outlet` property to identify the target outlet:
|
|
2382
|
+
*
|
|
2383
|
+
* `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`
|
|
2384
|
+
*
|
|
2385
|
+
* Using named outlets and secondary routes, you can target multiple outlets in
|
|
2386
|
+
* the same `RouterLink` directive.
|
|
2387
|
+
*
|
|
2388
|
+
* The router keeps track of separate branches in a navigation tree for each named outlet and
|
|
2389
|
+
* generates a representation of that tree in the URL.
|
|
2390
|
+
* The URL for a secondary route uses the following syntax to specify both the primary and secondary
|
|
2391
|
+
* routes at the same time:
|
|
2392
|
+
*
|
|
2393
|
+
* `http://base-path/primary-route-path(outlet-name:route-path)`
|
|
2394
|
+
*
|
|
2395
|
+
* A router outlet emits an activate event when a new component is instantiated,
|
|
2396
|
+
* deactivate event when a component is destroyed.
|
|
2397
|
+
* An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the
|
|
2398
|
+
* subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to
|
|
2399
|
+
* detach the subtree.
|
|
2400
|
+
*
|
|
2401
|
+
* ```
|
|
2402
|
+
* <router-outlet
|
|
2403
|
+
* (activate)='onActivate($event)'
|
|
2404
|
+
* (deactivate)='onDeactivate($event)'
|
|
2405
|
+
* (attach)='onAttach($event)'
|
|
2406
|
+
* (detach)='onDetach($event)'></router-outlet>
|
|
2407
|
+
* ```
|
|
2408
|
+
*
|
|
2409
|
+
* @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named
|
|
2410
|
+
* outlet and secondary route configuration").
|
|
2411
|
+
* @see `RouterLink`
|
|
2412
|
+
* @see `Route`
|
|
2413
|
+
* @ngModule RouterModule
|
|
2414
|
+
*
|
|
2415
|
+
* @publicApi
|
|
2416
|
+
*/
|
|
2417
|
+
class RouterOutlet {
|
|
2418
|
+
constructor(parentContexts, location, resolver, name, changeDetector) {
|
|
2419
|
+
this.parentContexts = parentContexts;
|
|
2420
|
+
this.location = location;
|
|
2421
|
+
this.resolver = resolver;
|
|
2422
|
+
this.changeDetector = changeDetector;
|
|
2423
|
+
this.activated = null;
|
|
2424
|
+
this._activatedRoute = null;
|
|
2425
|
+
this.activateEvents = new EventEmitter();
|
|
2426
|
+
this.deactivateEvents = new EventEmitter();
|
|
2427
|
+
/**
|
|
2428
|
+
* Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a
|
|
2429
|
+
* previously detached subtree.
|
|
2430
|
+
**/
|
|
2431
|
+
this.attachEvents = new EventEmitter();
|
|
2432
|
+
/**
|
|
2433
|
+
* Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the
|
|
2434
|
+
* subtree.
|
|
2435
|
+
*/
|
|
2436
|
+
this.detachEvents = new EventEmitter();
|
|
2437
|
+
this.name = name || PRIMARY_OUTLET;
|
|
2438
|
+
parentContexts.onChildOutletCreated(this.name, this);
|
|
2439
|
+
}
|
|
2440
|
+
/** @nodoc */
|
|
2441
|
+
ngOnDestroy() {
|
|
2442
|
+
this.parentContexts.onChildOutletDestroyed(this.name);
|
|
2443
|
+
}
|
|
2444
|
+
/** @nodoc */
|
|
2445
|
+
ngOnInit() {
|
|
2446
|
+
if (!this.activated) {
|
|
2447
|
+
// If the outlet was not instantiated at the time the route got activated we need to populate
|
|
2448
|
+
// the outlet when it is initialized (ie inside a NgIf)
|
|
2449
|
+
const context = this.parentContexts.getContext(this.name);
|
|
2450
|
+
if (context && context.route) {
|
|
2451
|
+
if (context.attachRef) {
|
|
2452
|
+
// `attachRef` is populated when there is an existing component to mount
|
|
2453
|
+
this.attach(context.attachRef, context.route);
|
|
2454
|
+
}
|
|
2455
|
+
else {
|
|
2456
|
+
// otherwise the component defined in the configuration is created
|
|
2457
|
+
this.activateWith(context.route, context.resolver || null);
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
get isActivated() {
|
|
2463
|
+
return !!this.activated;
|
|
2464
|
+
}
|
|
2465
|
+
/**
|
|
2466
|
+
* @returns The currently activated component instance.
|
|
2467
|
+
* @throws An error if the outlet is not activated.
|
|
2468
|
+
*/
|
|
2469
|
+
get component() {
|
|
2470
|
+
if (!this.activated)
|
|
2471
|
+
throw new Error('Outlet is not activated');
|
|
2472
|
+
return this.activated.instance;
|
|
2473
|
+
}
|
|
2474
|
+
get activatedRoute() {
|
|
2475
|
+
if (!this.activated)
|
|
2476
|
+
throw new Error('Outlet is not activated');
|
|
2477
|
+
return this._activatedRoute;
|
|
2478
|
+
}
|
|
2479
|
+
get activatedRouteData() {
|
|
2480
|
+
if (this._activatedRoute) {
|
|
2481
|
+
return this._activatedRoute.snapshot.data;
|
|
2482
|
+
}
|
|
2483
|
+
return {};
|
|
2484
|
+
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Called when the `RouteReuseStrategy` instructs to detach the subtree
|
|
2487
|
+
*/
|
|
2488
|
+
detach() {
|
|
2489
|
+
if (!this.activated)
|
|
2490
|
+
throw new Error('Outlet is not activated');
|
|
2491
|
+
this.location.detach();
|
|
2492
|
+
const cmp = this.activated;
|
|
2493
|
+
this.activated = null;
|
|
2494
|
+
this._activatedRoute = null;
|
|
2495
|
+
this.detachEvents.emit(cmp.instance);
|
|
2496
|
+
return cmp;
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
|
|
2500
|
+
*/
|
|
2501
|
+
attach(ref, activatedRoute) {
|
|
2502
|
+
this.activated = ref;
|
|
2503
|
+
this._activatedRoute = activatedRoute;
|
|
2504
|
+
this.location.insert(ref.hostView);
|
|
2505
|
+
this.attachEvents.emit(ref.instance);
|
|
2506
|
+
}
|
|
2507
|
+
deactivate() {
|
|
2508
|
+
if (this.activated) {
|
|
2509
|
+
const c = this.component;
|
|
2510
|
+
this.activated.destroy();
|
|
2511
|
+
this.activated = null;
|
|
2512
|
+
this._activatedRoute = null;
|
|
2513
|
+
this.deactivateEvents.emit(c);
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
activateWith(activatedRoute, resolver) {
|
|
2517
|
+
if (this.isActivated) {
|
|
2518
|
+
throw new Error('Cannot activate an already activated outlet');
|
|
2519
|
+
}
|
|
2520
|
+
this._activatedRoute = activatedRoute;
|
|
2521
|
+
const snapshot = activatedRoute._futureSnapshot;
|
|
2522
|
+
const component = snapshot.routeConfig.component;
|
|
2523
|
+
resolver = resolver || this.resolver;
|
|
2524
|
+
const factory = resolver.resolveComponentFactory(component);
|
|
2525
|
+
const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
|
|
2526
|
+
const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);
|
|
2527
|
+
this.activated = this.location.createComponent(factory, this.location.length, injector);
|
|
2528
|
+
// Calling `markForCheck` to make sure we will run the change detection when the
|
|
2529
|
+
// `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
|
|
2530
|
+
this.changeDetector.markForCheck();
|
|
2531
|
+
this.activateEvents.emit(this.activated.instance);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2535
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-rc.1", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
|
|
2536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2537
|
+
type: Directive,
|
|
2538
|
+
args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
|
|
2539
|
+
}], ctorParameters: function () {
|
|
2540
|
+
return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: undefined, decorators: [{
|
|
2541
|
+
type: Attribute,
|
|
2542
|
+
args: ['name']
|
|
2543
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
|
2544
|
+
}, propDecorators: { activateEvents: [{
|
|
2545
|
+
type: Output,
|
|
2546
|
+
args: ['activate']
|
|
2547
|
+
}], deactivateEvents: [{
|
|
2548
|
+
type: Output,
|
|
2549
|
+
args: ['deactivate']
|
|
2550
|
+
}], attachEvents: [{
|
|
2551
|
+
type: Output,
|
|
2552
|
+
args: ['attach']
|
|
2553
|
+
}], detachEvents: [{
|
|
2554
|
+
type: Output,
|
|
2555
|
+
args: ['detach']
|
|
2556
|
+
}] } });
|
|
2557
|
+
class OutletInjector {
|
|
2558
|
+
constructor(route, childContexts, parent) {
|
|
2559
|
+
this.route = route;
|
|
2560
|
+
this.childContexts = childContexts;
|
|
2561
|
+
this.parent = parent;
|
|
2562
|
+
}
|
|
2563
|
+
get(token, notFoundValue) {
|
|
2564
|
+
if (token === ActivatedRoute) {
|
|
2565
|
+
return this.route;
|
|
2566
|
+
}
|
|
2567
|
+
if (token === ChildrenOutletContexts) {
|
|
2568
|
+
return this.childContexts;
|
|
2569
|
+
}
|
|
2570
|
+
return this.parent.get(token, notFoundValue);
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2283
2574
|
/**
|
|
2284
2575
|
* @license
|
|
2285
2576
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -2298,9 +2589,12 @@ function prioritizedGuardValue() {
|
|
|
2298
2589
|
*/
|
|
2299
2590
|
class ɵEmptyOutletComponent {
|
|
2300
2591
|
}
|
|
2301
|
-
ɵEmptyOutletComponent
|
|
2302
|
-
|
|
2303
|
-
|
|
2592
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2593
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0-rc.1", type: ɵEmptyOutletComponent, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, directives: [{ type: RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2595
|
+
type: Component,
|
|
2596
|
+
args: [{ template: `<router-outlet></router-outlet>` }]
|
|
2597
|
+
}] });
|
|
2304
2598
|
|
|
2305
2599
|
/**
|
|
2306
2600
|
* @license
|
|
@@ -2428,7 +2722,7 @@ function sortByMatchingOutlets(routes, outletName) {
|
|
|
2428
2722
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2429
2723
|
* found in the LICENSE file at https://angular.io/license
|
|
2430
2724
|
*/
|
|
2431
|
-
const noMatch = {
|
|
2725
|
+
const noMatch$1 = {
|
|
2432
2726
|
matched: false,
|
|
2433
2727
|
consumedSegments: [],
|
|
2434
2728
|
lastChild: 0,
|
|
@@ -2439,7 +2733,7 @@ function match(segmentGroup, route, segments) {
|
|
|
2439
2733
|
var _a;
|
|
2440
2734
|
if (route.path === '') {
|
|
2441
2735
|
if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
|
|
2442
|
-
return Object.assign({}, noMatch);
|
|
2736
|
+
return Object.assign({}, noMatch$1);
|
|
2443
2737
|
}
|
|
2444
2738
|
return {
|
|
2445
2739
|
matched: true,
|
|
@@ -2452,7 +2746,7 @@ function match(segmentGroup, route, segments) {
|
|
|
2452
2746
|
const matcher = route.matcher || defaultUrlMatcher;
|
|
2453
2747
|
const res = matcher(segments, segmentGroup, route);
|
|
2454
2748
|
if (!res)
|
|
2455
|
-
return Object.assign({}, noMatch);
|
|
2749
|
+
return Object.assign({}, noMatch$1);
|
|
2456
2750
|
const posParams = {};
|
|
2457
2751
|
forEach(res.posParams, (v, k) => {
|
|
2458
2752
|
posParams[k] = v.path;
|
|
@@ -2569,7 +2863,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
|
|
|
2569
2863
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2570
2864
|
* found in the LICENSE file at https://angular.io/license
|
|
2571
2865
|
*/
|
|
2572
|
-
class NoMatch {
|
|
2866
|
+
class NoMatch$1 {
|
|
2573
2867
|
constructor(segmentGroup) {
|
|
2574
2868
|
this.segmentGroup = segmentGroup || null;
|
|
2575
2869
|
}
|
|
@@ -2579,8 +2873,8 @@ class AbsoluteRedirect {
|
|
|
2579
2873
|
this.urlTree = urlTree;
|
|
2580
2874
|
}
|
|
2581
2875
|
}
|
|
2582
|
-
function noMatch
|
|
2583
|
-
return new Observable((obs) => obs.error(new NoMatch(segmentGroup)));
|
|
2876
|
+
function noMatch(segmentGroup) {
|
|
2877
|
+
return new Observable((obs) => obs.error(new NoMatch$1(segmentGroup)));
|
|
2584
2878
|
}
|
|
2585
2879
|
function absoluteRedirect(newTree) {
|
|
2586
2880
|
return new Observable((obs) => obs.error(new AbsoluteRedirect(newTree)));
|
|
@@ -2596,7 +2890,7 @@ function canLoadFails(route) {
|
|
|
2596
2890
|
*
|
|
2597
2891
|
* Lazy modules are loaded along the way.
|
|
2598
2892
|
*/
|
|
2599
|
-
function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {
|
|
2893
|
+
function applyRedirects$1(moduleInjector, configLoader, urlSerializer, urlTree, config) {
|
|
2600
2894
|
return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();
|
|
2601
2895
|
}
|
|
2602
2896
|
class ApplyRedirects {
|
|
@@ -2629,7 +2923,7 @@ class ApplyRedirects {
|
|
|
2629
2923
|
// we need to run matching, so we can fetch all lazy-loaded modules
|
|
2630
2924
|
return this.match(e.urlTree);
|
|
2631
2925
|
}
|
|
2632
|
-
if (e instanceof NoMatch) {
|
|
2926
|
+
if (e instanceof NoMatch$1) {
|
|
2633
2927
|
throw this.noMatchError(e);
|
|
2634
2928
|
}
|
|
2635
2929
|
throw e;
|
|
@@ -2641,7 +2935,7 @@ class ApplyRedirects {
|
|
|
2641
2935
|
return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);
|
|
2642
2936
|
}));
|
|
2643
2937
|
return mapped$.pipe(catchError((e) => {
|
|
2644
|
-
if (e instanceof NoMatch) {
|
|
2938
|
+
if (e instanceof NoMatch$1) {
|
|
2645
2939
|
throw this.noMatchError(e);
|
|
2646
2940
|
}
|
|
2647
2941
|
throw e;
|
|
@@ -2694,7 +2988,7 @@ class ApplyRedirects {
|
|
|
2694
2988
|
return from(routes).pipe(concatMap((r) => {
|
|
2695
2989
|
const expanded$ = this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);
|
|
2696
2990
|
return expanded$.pipe(catchError((e) => {
|
|
2697
|
-
if (e instanceof NoMatch) {
|
|
2991
|
+
if (e instanceof NoMatch$1) {
|
|
2698
2992
|
return of(null);
|
|
2699
2993
|
}
|
|
2700
2994
|
throw e;
|
|
@@ -2704,14 +2998,14 @@ class ApplyRedirects {
|
|
|
2704
2998
|
if (noLeftoversInUrl(segmentGroup, segments, outlet)) {
|
|
2705
2999
|
return of(new UrlSegmentGroup([], {}));
|
|
2706
3000
|
}
|
|
2707
|
-
throw new NoMatch(segmentGroup);
|
|
3001
|
+
throw new NoMatch$1(segmentGroup);
|
|
2708
3002
|
}
|
|
2709
3003
|
throw e;
|
|
2710
3004
|
}));
|
|
2711
3005
|
}
|
|
2712
3006
|
expandSegmentAgainstRoute(ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {
|
|
2713
3007
|
if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {
|
|
2714
|
-
return noMatch
|
|
3008
|
+
return noMatch(segmentGroup);
|
|
2715
3009
|
}
|
|
2716
3010
|
if (route.redirectTo === undefined) {
|
|
2717
3011
|
return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);
|
|
@@ -2719,7 +3013,7 @@ class ApplyRedirects {
|
|
|
2719
3013
|
if (allowRedirects && this.allowRedirects) {
|
|
2720
3014
|
return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);
|
|
2721
3015
|
}
|
|
2722
|
-
return noMatch
|
|
3016
|
+
return noMatch(segmentGroup);
|
|
2723
3017
|
}
|
|
2724
3018
|
expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {
|
|
2725
3019
|
if (route.path === '**') {
|
|
@@ -2740,7 +3034,7 @@ class ApplyRedirects {
|
|
|
2740
3034
|
expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {
|
|
2741
3035
|
const { matched, consumedSegments, lastChild, positionalParamSegments } = match(segmentGroup, route, segments);
|
|
2742
3036
|
if (!matched)
|
|
2743
|
-
return noMatch
|
|
3037
|
+
return noMatch(segmentGroup);
|
|
2744
3038
|
const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);
|
|
2745
3039
|
if (route.redirectTo.startsWith('/')) {
|
|
2746
3040
|
return absoluteRedirect(newTree);
|
|
@@ -2763,7 +3057,7 @@ class ApplyRedirects {
|
|
|
2763
3057
|
}
|
|
2764
3058
|
const { matched, consumedSegments, lastChild } = match(rawSegmentGroup, route, segments);
|
|
2765
3059
|
if (!matched)
|
|
2766
|
-
return noMatch
|
|
3060
|
+
return noMatch(rawSegmentGroup);
|
|
2767
3061
|
const rawSlicedSegments = segments.slice(lastChild);
|
|
2768
3062
|
const childConfig$ = this.getChildConfig(ngModule, route, segments);
|
|
2769
3063
|
return childConfig$.pipe(mergeMap((routerConfig) => {
|
|
@@ -2941,8 +3235,8 @@ function squashSegmentGroup(segmentGroup) {
|
|
|
2941
3235
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2942
3236
|
* found in the LICENSE file at https://angular.io/license
|
|
2943
3237
|
*/
|
|
2944
|
-
function applyRedirects
|
|
2945
|
-
return switchMap(t => applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)
|
|
3238
|
+
function applyRedirects(moduleInjector, configLoader, urlSerializer, config) {
|
|
3239
|
+
return switchMap(t => applyRedirects$1(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)
|
|
2946
3240
|
.pipe(map(urlAfterRedirects => (Object.assign(Object.assign({}, t), { urlAfterRedirects })))));
|
|
2947
3241
|
}
|
|
2948
3242
|
|
|
@@ -3234,18 +3528,18 @@ function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector
|
|
|
3234
3528
|
* Use of this source code is governed by an MIT-style license that can be
|
|
3235
3529
|
* found in the LICENSE file at https://angular.io/license
|
|
3236
3530
|
*/
|
|
3237
|
-
class NoMatch
|
|
3531
|
+
class NoMatch {
|
|
3238
3532
|
}
|
|
3239
3533
|
function newObservableError(e) {
|
|
3240
3534
|
// TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.
|
|
3241
3535
|
return new Observable((obs) => obs.error(e));
|
|
3242
3536
|
}
|
|
3243
|
-
function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') {
|
|
3537
|
+
function recognize$1(rootComponentType, config, urlTree, url, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') {
|
|
3244
3538
|
try {
|
|
3245
3539
|
const result = new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)
|
|
3246
3540
|
.recognize();
|
|
3247
3541
|
if (result === null) {
|
|
3248
|
-
return newObservableError(new NoMatch
|
|
3542
|
+
return newObservableError(new NoMatch());
|
|
3249
3543
|
}
|
|
3250
3544
|
else {
|
|
3251
3545
|
return of(result);
|
|
@@ -3489,8 +3783,8 @@ function getResolve(route) {
|
|
|
3489
3783
|
* Use of this source code is governed by an MIT-style license that can be
|
|
3490
3784
|
* found in the LICENSE file at https://angular.io/license
|
|
3491
3785
|
*/
|
|
3492
|
-
function recognize
|
|
3493
|
-
return mergeMap(t => recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)
|
|
3786
|
+
function recognize(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {
|
|
3787
|
+
return mergeMap(t => recognize$1(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)
|
|
3494
3788
|
.pipe(map(targetSnapshot => (Object.assign(Object.assign({}, t), { targetSnapshot })))));
|
|
3495
3789
|
}
|
|
3496
3790
|
|
|
@@ -3652,127 +3946,49 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
|
3652
3946
|
*/
|
|
3653
3947
|
const ROUTES = new InjectionToken('ROUTES');
|
|
3654
3948
|
class RouterConfigLoader {
|
|
3655
|
-
constructor(
|
|
3656
|
-
this.
|
|
3949
|
+
constructor(injector, compiler, onLoadStartListener, onLoadEndListener) {
|
|
3950
|
+
this.injector = injector;
|
|
3657
3951
|
this.compiler = compiler;
|
|
3658
3952
|
this.onLoadStartListener = onLoadStartListener;
|
|
3659
3953
|
this.onLoadEndListener = onLoadEndListener;
|
|
3660
|
-
}
|
|
3661
|
-
load(parentInjector, route) {
|
|
3662
|
-
if (route._loader$) {
|
|
3663
|
-
return route._loader$;
|
|
3664
|
-
}
|
|
3665
|
-
if (this.onLoadStartListener) {
|
|
3666
|
-
this.onLoadStartListener(route);
|
|
3667
|
-
}
|
|
3668
|
-
const moduleFactory$ = this.loadModuleFactory(route.loadChildren);
|
|
3669
|
-
const loadRunner = moduleFactory$.pipe(map((factory) => {
|
|
3670
|
-
if (this.onLoadEndListener) {
|
|
3671
|
-
this.onLoadEndListener(route);
|
|
3672
|
-
}
|
|
3673
|
-
const module = factory.create(parentInjector);
|
|
3674
|
-
// When loading a module that doesn't provide `RouterModule.forChild()` preloader
|
|
3675
|
-
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
3676
|
-
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
3677
|
-
// for it's parent module instead.
|
|
3678
|
-
return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))
|
|
3679
|
-
.map(standardizeConfig), module);
|
|
3680
|
-
}), catchError((err) => {
|
|
3681
|
-
route._loader$ = undefined;
|
|
3682
|
-
throw err;
|
|
3683
|
-
}));
|
|
3684
|
-
// Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
|
|
3685
|
-
route._loader$ = new ConnectableObservable(loadRunner, () => new Subject())
|
|
3686
|
-
.pipe(refCount());
|
|
3687
|
-
return route._loader$;
|
|
3688
|
-
}
|
|
3689
|
-
loadModuleFactory(loadChildren) {
|
|
3690
|
-
if (typeof loadChildren === 'string') {
|
|
3691
|
-
return from(this.loader.load(loadChildren));
|
|
3692
|
-
}
|
|
3693
|
-
else {
|
|
3694
|
-
return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {
|
|
3695
|
-
if (t instanceof NgModuleFactory) {
|
|
3696
|
-
return of(t);
|
|
3697
|
-
}
|
|
3698
|
-
else {
|
|
3699
|
-
return from(this.compiler.compileModuleAsync(t));
|
|
3700
|
-
}
|
|
3701
|
-
}));
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
|
|
3706
|
-
/**
|
|
3707
|
-
* @license
|
|
3708
|
-
* Copyright Google LLC All Rights Reserved.
|
|
3709
|
-
*
|
|
3710
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
3711
|
-
* found in the LICENSE file at https://angular.io/license
|
|
3712
|
-
*/
|
|
3713
|
-
/**
|
|
3714
|
-
* Store contextual information about a `RouterOutlet`
|
|
3715
|
-
*
|
|
3716
|
-
* @publicApi
|
|
3717
|
-
*/
|
|
3718
|
-
class OutletContext {
|
|
3719
|
-
constructor() {
|
|
3720
|
-
this.outlet = null;
|
|
3721
|
-
this.route = null;
|
|
3722
|
-
this.resolver = null;
|
|
3723
|
-
this.children = new ChildrenOutletContexts();
|
|
3724
|
-
this.attachRef = null;
|
|
3725
|
-
}
|
|
3726
|
-
}
|
|
3727
|
-
/**
|
|
3728
|
-
* Store contextual information about the children (= nested) `RouterOutlet`
|
|
3729
|
-
*
|
|
3730
|
-
* @publicApi
|
|
3731
|
-
*/
|
|
3732
|
-
class ChildrenOutletContexts {
|
|
3733
|
-
constructor() {
|
|
3734
|
-
// contexts for child outlets, by name.
|
|
3735
|
-
this.contexts = new Map();
|
|
3736
|
-
}
|
|
3737
|
-
/** Called when a `RouterOutlet` directive is instantiated */
|
|
3738
|
-
onChildOutletCreated(childName, outlet) {
|
|
3739
|
-
const context = this.getOrCreateContext(childName);
|
|
3740
|
-
context.outlet = outlet;
|
|
3741
|
-
this.contexts.set(childName, context);
|
|
3742
|
-
}
|
|
3743
|
-
/**
|
|
3744
|
-
* Called when a `RouterOutlet` directive is destroyed.
|
|
3745
|
-
* We need to keep the context as the outlet could be destroyed inside a NgIf and might be
|
|
3746
|
-
* re-created later.
|
|
3747
|
-
*/
|
|
3748
|
-
onChildOutletDestroyed(childName) {
|
|
3749
|
-
const context = this.getContext(childName);
|
|
3750
|
-
if (context) {
|
|
3751
|
-
context.outlet = null;
|
|
3752
|
-
}
|
|
3753
|
-
}
|
|
3754
|
-
/**
|
|
3755
|
-
* Called when the corresponding route is deactivated during navigation.
|
|
3756
|
-
* Because the component get destroyed, all children outlet are destroyed.
|
|
3757
|
-
*/
|
|
3758
|
-
onOutletDeactivated() {
|
|
3759
|
-
const contexts = this.contexts;
|
|
3760
|
-
this.contexts = new Map();
|
|
3761
|
-
return contexts;
|
|
3762
|
-
}
|
|
3763
|
-
onOutletReAttached(contexts) {
|
|
3764
|
-
this.contexts = contexts;
|
|
3765
|
-
}
|
|
3766
|
-
getOrCreateContext(childName) {
|
|
3767
|
-
let context = this.getContext(childName);
|
|
3768
|
-
if (!context) {
|
|
3769
|
-
context = new OutletContext();
|
|
3770
|
-
this.contexts.set(childName, context);
|
|
3954
|
+
}
|
|
3955
|
+
load(parentInjector, route) {
|
|
3956
|
+
if (route._loader$) {
|
|
3957
|
+
return route._loader$;
|
|
3771
3958
|
}
|
|
3772
|
-
|
|
3959
|
+
if (this.onLoadStartListener) {
|
|
3960
|
+
this.onLoadStartListener(route);
|
|
3961
|
+
}
|
|
3962
|
+
const moduleFactory$ = this.loadModuleFactory(route.loadChildren);
|
|
3963
|
+
const loadRunner = moduleFactory$.pipe(map((factory) => {
|
|
3964
|
+
if (this.onLoadEndListener) {
|
|
3965
|
+
this.onLoadEndListener(route);
|
|
3966
|
+
}
|
|
3967
|
+
const module = factory.create(parentInjector);
|
|
3968
|
+
// When loading a module that doesn't provide `RouterModule.forChild()` preloader
|
|
3969
|
+
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
3970
|
+
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
3971
|
+
// for it's parent module instead.
|
|
3972
|
+
return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))
|
|
3973
|
+
.map(standardizeConfig), module);
|
|
3974
|
+
}), catchError((err) => {
|
|
3975
|
+
route._loader$ = undefined;
|
|
3976
|
+
throw err;
|
|
3977
|
+
}));
|
|
3978
|
+
// Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
|
|
3979
|
+
route._loader$ = new ConnectableObservable(loadRunner, () => new Subject())
|
|
3980
|
+
.pipe(refCount());
|
|
3981
|
+
return route._loader$;
|
|
3773
3982
|
}
|
|
3774
|
-
|
|
3775
|
-
return
|
|
3983
|
+
loadModuleFactory(loadChildren) {
|
|
3984
|
+
return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {
|
|
3985
|
+
if (t instanceof NgModuleFactory) {
|
|
3986
|
+
return of(t);
|
|
3987
|
+
}
|
|
3988
|
+
else {
|
|
3989
|
+
return from(this.compiler.compileModuleAsync(t));
|
|
3990
|
+
}
|
|
3991
|
+
}));
|
|
3776
3992
|
}
|
|
3777
3993
|
}
|
|
3778
3994
|
|
|
@@ -3807,13 +4023,6 @@ class DefaultUrlHandlingStrategy {
|
|
|
3807
4023
|
}
|
|
3808
4024
|
}
|
|
3809
4025
|
|
|
3810
|
-
/**
|
|
3811
|
-
* @license
|
|
3812
|
-
* Copyright Google LLC All Rights Reserved.
|
|
3813
|
-
*
|
|
3814
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
3815
|
-
* found in the LICENSE file at https://angular.io/license
|
|
3816
|
-
*/
|
|
3817
4026
|
function defaultErrorHandler(error) {
|
|
3818
4027
|
throw error;
|
|
3819
4028
|
}
|
|
@@ -3863,7 +4072,7 @@ class Router {
|
|
|
3863
4072
|
* Creates the router service.
|
|
3864
4073
|
*/
|
|
3865
4074
|
// TODO: vsavkin make internal after the final is out.
|
|
3866
|
-
constructor(rootComponentType, urlSerializer, rootContexts, location, injector,
|
|
4075
|
+
constructor(rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
|
|
3867
4076
|
this.rootComponentType = rootComponentType;
|
|
3868
4077
|
this.urlSerializer = urlSerializer;
|
|
3869
4078
|
this.rootContexts = rootContexts;
|
|
@@ -3991,7 +4200,7 @@ class Router {
|
|
|
3991
4200
|
this.currentUrlTree = createEmptyUrlTree();
|
|
3992
4201
|
this.rawUrlTree = this.currentUrlTree;
|
|
3993
4202
|
this.browserUrlTree = this.currentUrlTree;
|
|
3994
|
-
this.configLoader = new RouterConfigLoader(
|
|
4203
|
+
this.configLoader = new RouterConfigLoader(injector, compiler, onLoadStart, onLoadEnd);
|
|
3995
4204
|
this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);
|
|
3996
4205
|
this.transitions = new BehaviorSubject({
|
|
3997
4206
|
id: 0,
|
|
@@ -4077,14 +4286,14 @@ class Router {
|
|
|
4077
4286
|
return Promise.resolve(t);
|
|
4078
4287
|
}),
|
|
4079
4288
|
// ApplyRedirects
|
|
4080
|
-
applyRedirects
|
|
4289
|
+
applyRedirects(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config),
|
|
4081
4290
|
// Update the currentNavigation
|
|
4082
4291
|
// `urlAfterRedirects` is guaranteed to be set after this point
|
|
4083
4292
|
tap(t => {
|
|
4084
4293
|
this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects });
|
|
4085
4294
|
}),
|
|
4086
4295
|
// Recognize
|
|
4087
|
-
recognize
|
|
4296
|
+
recognize(this.rootComponentType, this.config, (url) => this.serializeUrl(url), this.paramsInheritanceStrategy, this.relativeLinkResolution),
|
|
4088
4297
|
// Update URL if in `eager` update mode
|
|
4089
4298
|
tap(t => {
|
|
4090
4299
|
if (this.urlUpdateStrategy === 'eager') {
|
|
@@ -4217,6 +4426,7 @@ class Router {
|
|
|
4217
4426
|
completed = true;
|
|
4218
4427
|
}
|
|
4219
4428
|
}), finalize(() => {
|
|
4429
|
+
var _a;
|
|
4220
4430
|
/* When the navigation stream finishes either through error or success, we
|
|
4221
4431
|
* set the `completed` or `errored` flag. However, there are some situations
|
|
4222
4432
|
* where we could get here without either of those being set. For instance, a
|
|
@@ -4228,10 +4438,11 @@ class Router {
|
|
|
4228
4438
|
const cancelationReason = `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`;
|
|
4229
4439
|
this.cancelNavigationTransition(t, cancelationReason);
|
|
4230
4440
|
}
|
|
4231
|
-
//
|
|
4232
|
-
//
|
|
4233
|
-
|
|
4234
|
-
|
|
4441
|
+
// Only clear current navigation if it is still set to the one that
|
|
4442
|
+
// finalized.
|
|
4443
|
+
if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
|
|
4444
|
+
this.currentNavigation = null;
|
|
4445
|
+
}
|
|
4235
4446
|
}), catchError((e) => {
|
|
4236
4447
|
// TODO(atscott): The NavigationTransition `t` used here does not accurately
|
|
4237
4448
|
// reflect the current state of the whole transition because some operations
|
|
@@ -4256,7 +4467,7 @@ class Router {
|
|
|
4256
4467
|
// This is only applicable with initial navigation, so setting
|
|
4257
4468
|
// `navigated` only when not redirecting resolves this scenario.
|
|
4258
4469
|
this.navigated = true;
|
|
4259
|
-
this.restoreHistory(t
|
|
4470
|
+
this.restoreHistory(t);
|
|
4260
4471
|
}
|
|
4261
4472
|
const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);
|
|
4262
4473
|
eventsSubject.next(navCancel);
|
|
@@ -4288,7 +4499,7 @@ class Router {
|
|
|
4288
4499
|
* the pre-error state. */
|
|
4289
4500
|
}
|
|
4290
4501
|
else {
|
|
4291
|
-
this.restoreHistory(t
|
|
4502
|
+
this.restoreHistory(t);
|
|
4292
4503
|
const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);
|
|
4293
4504
|
eventsSubject.next(navError);
|
|
4294
4505
|
try {
|
|
@@ -4607,26 +4818,18 @@ class Router {
|
|
|
4607
4818
|
if (this.disposed) {
|
|
4608
4819
|
return Promise.resolve(false);
|
|
4609
4820
|
}
|
|
4610
|
-
//
|
|
4611
|
-
// router states.
|
|
4612
|
-
//
|
|
4613
|
-
// the user follows that with a navigation using the back/forward button or manual URL change,
|
|
4614
|
-
// the destination may be the same as the previous imperative attempt. We should not skip
|
|
4615
|
-
// these navigations because it's a separate case from the one above -- it's not a duplicate
|
|
4616
|
-
// navigation.
|
|
4821
|
+
// Duplicate navigations may be triggered by attempts to sync AngularJS and
|
|
4822
|
+
// Angular router states. We have the setTimeout in the location listener to
|
|
4823
|
+
// ensure the imperative nav is scheduled before the browser nav.
|
|
4617
4824
|
const lastNavigation = this.transitions.value;
|
|
4618
|
-
// We don't want to skip duplicate successful navs if they're imperative because
|
|
4619
|
-
// onSameUrlNavigation could be 'reload' (so the duplicate is intended).
|
|
4620
4825
|
const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&
|
|
4621
4826
|
!isBrowserTriggeredNavigation(lastNavigation.source);
|
|
4622
|
-
const
|
|
4623
|
-
|
|
4624
|
-
//
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();
|
|
4629
|
-
if (browserNavPrecededByRouterNav && duplicateNav) {
|
|
4827
|
+
const navToSameUrl = lastNavigation.rawUrl.toString() === rawUrl.toString();
|
|
4828
|
+
const lastNavigationInProgress = lastNavigation.id === ((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id);
|
|
4829
|
+
// We consider duplicates as ones that goes to the same URL while the first
|
|
4830
|
+
// is still processing.
|
|
4831
|
+
const isDuplicateNav = navToSameUrl && lastNavigationInProgress;
|
|
4832
|
+
if (browserNavPrecededByRouterNav && isDuplicateNav) {
|
|
4630
4833
|
return Promise.resolve(true); // return value is not used
|
|
4631
4834
|
}
|
|
4632
4835
|
let resolve;
|
|
@@ -4706,7 +4909,7 @@ class Router {
|
|
|
4706
4909
|
* Performs the necessary rollback action to restore the browser URL to the
|
|
4707
4910
|
* state before the transition.
|
|
4708
4911
|
*/
|
|
4709
|
-
restoreHistory(t
|
|
4912
|
+
restoreHistory(t) {
|
|
4710
4913
|
var _a, _b;
|
|
4711
4914
|
if (this.canceledNavigationResolution === 'computed') {
|
|
4712
4915
|
const targetPagePosition = this.currentPageId - t.targetPageId;
|
|
@@ -4728,7 +4931,6 @@ class Router {
|
|
|
4728
4931
|
// TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.
|
|
4729
4932
|
// Investigate if this can be done by running TGP.
|
|
4730
4933
|
this.browserUrlTree = t.currentUrlTree;
|
|
4731
|
-
this.resetUrlToCurrentUrlTree();
|
|
4732
4934
|
}
|
|
4733
4935
|
else {
|
|
4734
4936
|
// The browser URL and router state was not updated before the navigation cancelled so
|
|
@@ -4736,14 +4938,7 @@ class Router {
|
|
|
4736
4938
|
}
|
|
4737
4939
|
}
|
|
4738
4940
|
else if (this.canceledNavigationResolution === 'replace') {
|
|
4739
|
-
|
|
4740
|
-
// for `deferred` navigations that haven't change the internal state yet because guards
|
|
4741
|
-
// reject. For 'eager' navigations, it seems like we also really should reset the state
|
|
4742
|
-
// because the navigation was cancelled. Investigate if this can be done by running TGP.
|
|
4743
|
-
if (restoringFromCaughtError) {
|
|
4744
|
-
this.resetState(t);
|
|
4745
|
-
}
|
|
4746
|
-
this.resetUrlToCurrentUrlTree();
|
|
4941
|
+
this.resetState(t);
|
|
4747
4942
|
}
|
|
4748
4943
|
}
|
|
4749
4944
|
resetState(t) {
|
|
@@ -4755,6 +4950,7 @@ class Router {
|
|
|
4755
4950
|
// addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL
|
|
4756
4951
|
// when merging, such as the query params so they are not lost on a refresh.
|
|
4757
4952
|
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
|
|
4953
|
+
this.resetUrlToCurrentUrlTree();
|
|
4758
4954
|
}
|
|
4759
4955
|
resetUrlToCurrentUrlTree() {
|
|
4760
4956
|
this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
|
|
@@ -4771,19 +4967,11 @@ class Router {
|
|
|
4771
4967
|
return { navigationId };
|
|
4772
4968
|
}
|
|
4773
4969
|
}
|
|
4774
|
-
Router
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
{ type: UrlSerializer },
|
|
4780
|
-
{ type: ChildrenOutletContexts },
|
|
4781
|
-
{ type: Location },
|
|
4782
|
-
{ type: Injector },
|
|
4783
|
-
{ type: NgModuleFactoryLoader },
|
|
4784
|
-
{ type: Compiler },
|
|
4785
|
-
{ type: undefined }
|
|
4786
|
-
];
|
|
4970
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
4971
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: Router });
|
|
4972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: Router, decorators: [{
|
|
4973
|
+
type: Injectable
|
|
4974
|
+
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
4787
4975
|
function validateCommands(commands) {
|
|
4788
4976
|
for (let i = 0; i < commands.length; i++) {
|
|
4789
4977
|
const cmd = commands[i];
|
|
@@ -4796,13 +4984,6 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
4796
4984
|
return source !== 'imperative';
|
|
4797
4985
|
}
|
|
4798
4986
|
|
|
4799
|
-
/**
|
|
4800
|
-
* @license
|
|
4801
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4802
|
-
*
|
|
4803
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
4804
|
-
* found in the LICENSE file at https://angular.io/license
|
|
4805
|
-
*/
|
|
4806
4987
|
/**
|
|
4807
4988
|
* @description
|
|
4808
4989
|
*
|
|
@@ -4980,28 +5161,38 @@ class RouterLink {
|
|
|
4980
5161
|
});
|
|
4981
5162
|
}
|
|
4982
5163
|
}
|
|
4983
|
-
RouterLink
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
];
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5164
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5165
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-rc.1", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
|
|
5166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLink, decorators: [{
|
|
5167
|
+
type: Directive,
|
|
5168
|
+
args: [{ selector: ':not(a):not(area)[routerLink]' }]
|
|
5169
|
+
}], ctorParameters: function () {
|
|
5170
|
+
return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
|
|
5171
|
+
type: Attribute,
|
|
5172
|
+
args: ['tabindex']
|
|
5173
|
+
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }];
|
|
5174
|
+
}, propDecorators: { queryParams: [{
|
|
5175
|
+
type: Input
|
|
5176
|
+
}], fragment: [{
|
|
5177
|
+
type: Input
|
|
5178
|
+
}], queryParamsHandling: [{
|
|
5179
|
+
type: Input
|
|
5180
|
+
}], preserveFragment: [{
|
|
5181
|
+
type: Input
|
|
5182
|
+
}], skipLocationChange: [{
|
|
5183
|
+
type: Input
|
|
5184
|
+
}], replaceUrl: [{
|
|
5185
|
+
type: Input
|
|
5186
|
+
}], state: [{
|
|
5187
|
+
type: Input
|
|
5188
|
+
}], relativeTo: [{
|
|
5189
|
+
type: Input
|
|
5190
|
+
}], routerLink: [{
|
|
5191
|
+
type: Input
|
|
5192
|
+
}], onClick: [{
|
|
5193
|
+
type: HostListener,
|
|
5194
|
+
args: ['click']
|
|
5195
|
+
}] } });
|
|
5005
5196
|
/**
|
|
5006
5197
|
* @description
|
|
5007
5198
|
*
|
|
@@ -5091,29 +5282,42 @@ class RouterLinkWithHref {
|
|
|
5091
5282
|
});
|
|
5092
5283
|
}
|
|
5093
5284
|
}
|
|
5094
|
-
RouterLinkWithHref
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
]
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
}
|
|
5285
|
+
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5286
|
+
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-rc.1", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
|
|
5287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLinkWithHref, decorators: [{
|
|
5288
|
+
type: Directive,
|
|
5289
|
+
args: [{ selector: 'a[routerLink],area[routerLink]' }]
|
|
5290
|
+
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
|
|
5291
|
+
type: HostBinding,
|
|
5292
|
+
args: ['attr.target']
|
|
5293
|
+
}, {
|
|
5294
|
+
type: Input
|
|
5295
|
+
}], queryParams: [{
|
|
5296
|
+
type: Input
|
|
5297
|
+
}], fragment: [{
|
|
5298
|
+
type: Input
|
|
5299
|
+
}], queryParamsHandling: [{
|
|
5300
|
+
type: Input
|
|
5301
|
+
}], preserveFragment: [{
|
|
5302
|
+
type: Input
|
|
5303
|
+
}], skipLocationChange: [{
|
|
5304
|
+
type: Input
|
|
5305
|
+
}], replaceUrl: [{
|
|
5306
|
+
type: Input
|
|
5307
|
+
}], state: [{
|
|
5308
|
+
type: Input
|
|
5309
|
+
}], relativeTo: [{
|
|
5310
|
+
type: Input
|
|
5311
|
+
}], href: [{
|
|
5312
|
+
type: HostBinding,
|
|
5313
|
+
args: ['attr.href']
|
|
5314
|
+
}], routerLink: [{
|
|
5315
|
+
type: Input
|
|
5316
|
+
}], onClick: [{
|
|
5317
|
+
type: HostListener,
|
|
5318
|
+
args: ['click',
|
|
5319
|
+
['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]
|
|
5320
|
+
}] } });
|
|
5117
5321
|
function attrBoolValue(s) {
|
|
5118
5322
|
return s === '' || !!s;
|
|
5119
5323
|
}
|
|
@@ -5294,27 +5498,33 @@ class RouterLinkActive {
|
|
|
5294
5498
|
this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
|
|
5295
5499
|
}
|
|
5296
5500
|
}
|
|
5297
|
-
RouterLinkActive
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
]
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
];
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
}
|
|
5501
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5502
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-rc.1", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
5503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
5504
|
+
type: Directive,
|
|
5505
|
+
args: [{
|
|
5506
|
+
selector: '[routerLinkActive]',
|
|
5507
|
+
exportAs: 'routerLinkActive',
|
|
5508
|
+
}]
|
|
5509
|
+
}], ctorParameters: function () {
|
|
5510
|
+
return [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{
|
|
5511
|
+
type: Optional
|
|
5512
|
+
}] }, { type: RouterLinkWithHref, decorators: [{
|
|
5513
|
+
type: Optional
|
|
5514
|
+
}] }];
|
|
5515
|
+
}, propDecorators: { links: [{
|
|
5516
|
+
type: ContentChildren,
|
|
5517
|
+
args: [RouterLink, { descendants: true }]
|
|
5518
|
+
}], linksWithHrefs: [{
|
|
5519
|
+
type: ContentChildren,
|
|
5520
|
+
args: [RouterLinkWithHref, { descendants: true }]
|
|
5521
|
+
}], routerLinkActiveOptions: [{
|
|
5522
|
+
type: Input
|
|
5523
|
+
}], isActiveChange: [{
|
|
5524
|
+
type: Output
|
|
5525
|
+
}], routerLinkActive: [{
|
|
5526
|
+
type: Input
|
|
5527
|
+
}] } });
|
|
5318
5528
|
/**
|
|
5319
5529
|
* Use instead of `'paths' in options` to be compatible with property renaming
|
|
5320
5530
|
*/
|
|
@@ -5322,195 +5532,6 @@ function isActiveMatchOptions(options) {
|
|
|
5322
5532
|
return !!options.paths;
|
|
5323
5533
|
}
|
|
5324
5534
|
|
|
5325
|
-
/**
|
|
5326
|
-
* @license
|
|
5327
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5328
|
-
*
|
|
5329
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
5330
|
-
* found in the LICENSE file at https://angular.io/license
|
|
5331
|
-
*/
|
|
5332
|
-
/**
|
|
5333
|
-
* @description
|
|
5334
|
-
*
|
|
5335
|
-
* Acts as a placeholder that Angular dynamically fills based on the current router state.
|
|
5336
|
-
*
|
|
5337
|
-
* Each outlet can have a unique name, determined by the optional `name` attribute.
|
|
5338
|
-
* The name cannot be set or changed dynamically. If not set, default value is "primary".
|
|
5339
|
-
*
|
|
5340
|
-
* ```
|
|
5341
|
-
* <router-outlet></router-outlet>
|
|
5342
|
-
* <router-outlet name='left'></router-outlet>
|
|
5343
|
-
* <router-outlet name='right'></router-outlet>
|
|
5344
|
-
* ```
|
|
5345
|
-
*
|
|
5346
|
-
* Named outlets can be the targets of secondary routes.
|
|
5347
|
-
* The `Route` object for a secondary route has an `outlet` property to identify the target outlet:
|
|
5348
|
-
*
|
|
5349
|
-
* `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`
|
|
5350
|
-
*
|
|
5351
|
-
* Using named outlets and secondary routes, you can target multiple outlets in
|
|
5352
|
-
* the same `RouterLink` directive.
|
|
5353
|
-
*
|
|
5354
|
-
* The router keeps track of separate branches in a navigation tree for each named outlet and
|
|
5355
|
-
* generates a representation of that tree in the URL.
|
|
5356
|
-
* The URL for a secondary route uses the following syntax to specify both the primary and secondary
|
|
5357
|
-
* routes at the same time:
|
|
5358
|
-
*
|
|
5359
|
-
* `http://base-path/primary-route-path(outlet-name:route-path)`
|
|
5360
|
-
*
|
|
5361
|
-
* A router outlet emits an activate event when a new component is instantiated,
|
|
5362
|
-
* and a deactivate event when a component is destroyed.
|
|
5363
|
-
*
|
|
5364
|
-
* ```
|
|
5365
|
-
* <router-outlet
|
|
5366
|
-
* (activate)='onActivate($event)'
|
|
5367
|
-
* (deactivate)='onDeactivate($event)'></router-outlet>
|
|
5368
|
-
* ```
|
|
5369
|
-
*
|
|
5370
|
-
* @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named
|
|
5371
|
-
* outlet and secondary route configuration").
|
|
5372
|
-
* @see `RouterLink`
|
|
5373
|
-
* @see `Route`
|
|
5374
|
-
* @ngModule RouterModule
|
|
5375
|
-
*
|
|
5376
|
-
* @publicApi
|
|
5377
|
-
*/
|
|
5378
|
-
class RouterOutlet {
|
|
5379
|
-
constructor(parentContexts, location, resolver, name, changeDetector) {
|
|
5380
|
-
this.parentContexts = parentContexts;
|
|
5381
|
-
this.location = location;
|
|
5382
|
-
this.resolver = resolver;
|
|
5383
|
-
this.changeDetector = changeDetector;
|
|
5384
|
-
this.activated = null;
|
|
5385
|
-
this._activatedRoute = null;
|
|
5386
|
-
this.activateEvents = new EventEmitter();
|
|
5387
|
-
this.deactivateEvents = new EventEmitter();
|
|
5388
|
-
this.name = name || PRIMARY_OUTLET;
|
|
5389
|
-
parentContexts.onChildOutletCreated(this.name, this);
|
|
5390
|
-
}
|
|
5391
|
-
/** @nodoc */
|
|
5392
|
-
ngOnDestroy() {
|
|
5393
|
-
this.parentContexts.onChildOutletDestroyed(this.name);
|
|
5394
|
-
}
|
|
5395
|
-
/** @nodoc */
|
|
5396
|
-
ngOnInit() {
|
|
5397
|
-
if (!this.activated) {
|
|
5398
|
-
// If the outlet was not instantiated at the time the route got activated we need to populate
|
|
5399
|
-
// the outlet when it is initialized (ie inside a NgIf)
|
|
5400
|
-
const context = this.parentContexts.getContext(this.name);
|
|
5401
|
-
if (context && context.route) {
|
|
5402
|
-
if (context.attachRef) {
|
|
5403
|
-
// `attachRef` is populated when there is an existing component to mount
|
|
5404
|
-
this.attach(context.attachRef, context.route);
|
|
5405
|
-
}
|
|
5406
|
-
else {
|
|
5407
|
-
// otherwise the component defined in the configuration is created
|
|
5408
|
-
this.activateWith(context.route, context.resolver || null);
|
|
5409
|
-
}
|
|
5410
|
-
}
|
|
5411
|
-
}
|
|
5412
|
-
}
|
|
5413
|
-
get isActivated() {
|
|
5414
|
-
return !!this.activated;
|
|
5415
|
-
}
|
|
5416
|
-
/**
|
|
5417
|
-
* @returns The currently activated component instance.
|
|
5418
|
-
* @throws An error if the outlet is not activated.
|
|
5419
|
-
*/
|
|
5420
|
-
get component() {
|
|
5421
|
-
if (!this.activated)
|
|
5422
|
-
throw new Error('Outlet is not activated');
|
|
5423
|
-
return this.activated.instance;
|
|
5424
|
-
}
|
|
5425
|
-
get activatedRoute() {
|
|
5426
|
-
if (!this.activated)
|
|
5427
|
-
throw new Error('Outlet is not activated');
|
|
5428
|
-
return this._activatedRoute;
|
|
5429
|
-
}
|
|
5430
|
-
get activatedRouteData() {
|
|
5431
|
-
if (this._activatedRoute) {
|
|
5432
|
-
return this._activatedRoute.snapshot.data;
|
|
5433
|
-
}
|
|
5434
|
-
return {};
|
|
5435
|
-
}
|
|
5436
|
-
/**
|
|
5437
|
-
* Called when the `RouteReuseStrategy` instructs to detach the subtree
|
|
5438
|
-
*/
|
|
5439
|
-
detach() {
|
|
5440
|
-
if (!this.activated)
|
|
5441
|
-
throw new Error('Outlet is not activated');
|
|
5442
|
-
this.location.detach();
|
|
5443
|
-
const cmp = this.activated;
|
|
5444
|
-
this.activated = null;
|
|
5445
|
-
this._activatedRoute = null;
|
|
5446
|
-
return cmp;
|
|
5447
|
-
}
|
|
5448
|
-
/**
|
|
5449
|
-
* Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
|
|
5450
|
-
*/
|
|
5451
|
-
attach(ref, activatedRoute) {
|
|
5452
|
-
this.activated = ref;
|
|
5453
|
-
this._activatedRoute = activatedRoute;
|
|
5454
|
-
this.location.insert(ref.hostView);
|
|
5455
|
-
}
|
|
5456
|
-
deactivate() {
|
|
5457
|
-
if (this.activated) {
|
|
5458
|
-
const c = this.component;
|
|
5459
|
-
this.activated.destroy();
|
|
5460
|
-
this.activated = null;
|
|
5461
|
-
this._activatedRoute = null;
|
|
5462
|
-
this.deactivateEvents.emit(c);
|
|
5463
|
-
}
|
|
5464
|
-
}
|
|
5465
|
-
activateWith(activatedRoute, resolver) {
|
|
5466
|
-
if (this.isActivated) {
|
|
5467
|
-
throw new Error('Cannot activate an already activated outlet');
|
|
5468
|
-
}
|
|
5469
|
-
this._activatedRoute = activatedRoute;
|
|
5470
|
-
const snapshot = activatedRoute._futureSnapshot;
|
|
5471
|
-
const component = snapshot.routeConfig.component;
|
|
5472
|
-
resolver = resolver || this.resolver;
|
|
5473
|
-
const factory = resolver.resolveComponentFactory(component);
|
|
5474
|
-
const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
|
|
5475
|
-
const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);
|
|
5476
|
-
this.activated = this.location.createComponent(factory, this.location.length, injector);
|
|
5477
|
-
// Calling `markForCheck` to make sure we will run the change detection when the
|
|
5478
|
-
// `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
|
|
5479
|
-
this.changeDetector.markForCheck();
|
|
5480
|
-
this.activateEvents.emit(this.activated.instance);
|
|
5481
|
-
}
|
|
5482
|
-
}
|
|
5483
|
-
RouterOutlet.decorators = [
|
|
5484
|
-
{ type: Directive, args: [{ selector: 'router-outlet', exportAs: 'outlet' },] }
|
|
5485
|
-
];
|
|
5486
|
-
RouterOutlet.ctorParameters = () => [
|
|
5487
|
-
{ type: ChildrenOutletContexts },
|
|
5488
|
-
{ type: ViewContainerRef },
|
|
5489
|
-
{ type: ComponentFactoryResolver },
|
|
5490
|
-
{ type: String, decorators: [{ type: Attribute, args: ['name',] }] },
|
|
5491
|
-
{ type: ChangeDetectorRef }
|
|
5492
|
-
];
|
|
5493
|
-
RouterOutlet.propDecorators = {
|
|
5494
|
-
activateEvents: [{ type: Output, args: ['activate',] }],
|
|
5495
|
-
deactivateEvents: [{ type: Output, args: ['deactivate',] }]
|
|
5496
|
-
};
|
|
5497
|
-
class OutletInjector {
|
|
5498
|
-
constructor(route, childContexts, parent) {
|
|
5499
|
-
this.route = route;
|
|
5500
|
-
this.childContexts = childContexts;
|
|
5501
|
-
this.parent = parent;
|
|
5502
|
-
}
|
|
5503
|
-
get(token, notFoundValue) {
|
|
5504
|
-
if (token === ActivatedRoute) {
|
|
5505
|
-
return this.route;
|
|
5506
|
-
}
|
|
5507
|
-
if (token === ChildrenOutletContexts) {
|
|
5508
|
-
return this.childContexts;
|
|
5509
|
-
}
|
|
5510
|
-
return this.parent.get(token, notFoundValue);
|
|
5511
|
-
}
|
|
5512
|
-
}
|
|
5513
|
-
|
|
5514
5535
|
/**
|
|
5515
5536
|
* @license
|
|
5516
5537
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -5570,13 +5591,13 @@ class NoPreloading {
|
|
|
5570
5591
|
* @publicApi
|
|
5571
5592
|
*/
|
|
5572
5593
|
class RouterPreloader {
|
|
5573
|
-
constructor(router,
|
|
5594
|
+
constructor(router, compiler, injector, preloadingStrategy) {
|
|
5574
5595
|
this.router = router;
|
|
5575
5596
|
this.injector = injector;
|
|
5576
5597
|
this.preloadingStrategy = preloadingStrategy;
|
|
5577
5598
|
const onStartLoad = (r) => router.triggerEvent(new RouteConfigLoadStart(r));
|
|
5578
5599
|
const onEndLoad = (r) => router.triggerEvent(new RouteConfigLoadEnd(r));
|
|
5579
|
-
this.loader = new RouterConfigLoader(
|
|
5600
|
+
this.loader = new RouterConfigLoader(injector, compiler, onStartLoad, onEndLoad);
|
|
5580
5601
|
}
|
|
5581
5602
|
setUpPreloading() {
|
|
5582
5603
|
this.subscription =
|
|
@@ -5624,24 +5645,12 @@ class RouterPreloader {
|
|
|
5624
5645
|
});
|
|
5625
5646
|
}
|
|
5626
5647
|
}
|
|
5627
|
-
RouterPreloader
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
{ type: NgModuleFactoryLoader },
|
|
5633
|
-
{ type: Compiler },
|
|
5634
|
-
{ type: Injector },
|
|
5635
|
-
{ type: PreloadingStrategy }
|
|
5636
|
-
];
|
|
5648
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.Injector }, { token: PreloadingStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5649
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterPreloader });
|
|
5650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
5651
|
+
type: Injectable
|
|
5652
|
+
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.Injector }, { type: PreloadingStrategy }]; } });
|
|
5637
5653
|
|
|
5638
|
-
/**
|
|
5639
|
-
* @license
|
|
5640
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5641
|
-
*
|
|
5642
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
5643
|
-
* found in the LICENSE file at https://angular.io/license
|
|
5644
|
-
*/
|
|
5645
5654
|
class RouterScroller {
|
|
5646
5655
|
constructor(router,
|
|
5647
5656
|
/** @docsNotRequired */ viewportScroller, options = {}) {
|
|
@@ -5717,14 +5726,11 @@ class RouterScroller {
|
|
|
5717
5726
|
}
|
|
5718
5727
|
}
|
|
5719
5728
|
}
|
|
5720
|
-
RouterScroller
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
{ type: ViewportScroller },
|
|
5726
|
-
{ type: undefined }
|
|
5727
|
-
];
|
|
5729
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
5730
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterScroller });
|
|
5731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterScroller, decorators: [{
|
|
5732
|
+
type: Injectable
|
|
5733
|
+
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
|
|
5728
5734
|
|
|
5729
5735
|
/**
|
|
5730
5736
|
* @license
|
|
@@ -5747,7 +5753,6 @@ const ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');
|
|
|
5747
5753
|
* @docsNotRequired
|
|
5748
5754
|
*/
|
|
5749
5755
|
const ROUTER_FORROOT_GUARD = new InjectionToken('ROUTER_FORROOT_GUARD');
|
|
5750
|
-
const ɵ0 = { enableTracing: false };
|
|
5751
5756
|
const ROUTER_PROVIDERS = [
|
|
5752
5757
|
Location,
|
|
5753
5758
|
{ provide: UrlSerializer, useClass: DefaultUrlSerializer },
|
|
@@ -5755,18 +5760,17 @@ const ROUTER_PROVIDERS = [
|
|
|
5755
5760
|
provide: Router,
|
|
5756
5761
|
useFactory: setupRouter,
|
|
5757
5762
|
deps: [
|
|
5758
|
-
UrlSerializer, ChildrenOutletContexts, Location, Injector,
|
|
5759
|
-
|
|
5763
|
+
UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES,
|
|
5764
|
+
ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],
|
|
5760
5765
|
[RouteReuseStrategy, new Optional()]
|
|
5761
5766
|
]
|
|
5762
5767
|
},
|
|
5763
5768
|
ChildrenOutletContexts,
|
|
5764
5769
|
{ provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
|
|
5765
|
-
{ provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader },
|
|
5766
5770
|
RouterPreloader,
|
|
5767
5771
|
NoPreloading,
|
|
5768
5772
|
PreloadAllModules,
|
|
5769
|
-
{ provide: ROUTER_CONFIGURATION, useValue:
|
|
5773
|
+
{ provide: ROUTER_CONFIGURATION, useValue: { enableTracing: false } },
|
|
5770
5774
|
];
|
|
5771
5775
|
function routerNgProbeToken() {
|
|
5772
5776
|
return new NgProbeToken('Router', Router);
|
|
@@ -5865,17 +5869,26 @@ class RouterModule {
|
|
|
5865
5869
|
return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
|
|
5866
5870
|
}
|
|
5867
5871
|
}
|
|
5868
|
-
RouterModule
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
]
|
|
5872
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5873
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
5874
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterModule });
|
|
5875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterModule, decorators: [{
|
|
5876
|
+
type: NgModule,
|
|
5877
|
+
args: [{
|
|
5878
|
+
declarations: ROUTER_DIRECTIVES,
|
|
5879
|
+
exports: ROUTER_DIRECTIVES,
|
|
5880
|
+
entryComponents: [ɵEmptyOutletComponent]
|
|
5881
|
+
}]
|
|
5882
|
+
}], ctorParameters: function () {
|
|
5883
|
+
return [{ type: undefined, decorators: [{
|
|
5884
|
+
type: Optional
|
|
5885
|
+
}, {
|
|
5886
|
+
type: Inject,
|
|
5887
|
+
args: [ROUTER_FORROOT_GUARD]
|
|
5888
|
+
}] }, { type: Router, decorators: [{
|
|
5889
|
+
type: Optional
|
|
5890
|
+
}] }];
|
|
5891
|
+
} });
|
|
5879
5892
|
function createRouterScroller(router, viewportScroller, config) {
|
|
5880
5893
|
if (config.scrollOffset) {
|
|
5881
5894
|
viewportScroller.setOffset(config.scrollOffset);
|
|
@@ -5914,8 +5927,8 @@ function provideRoutes(routes) {
|
|
|
5914
5927
|
{ provide: ROUTES, multi: true, useValue: routes },
|
|
5915
5928
|
];
|
|
5916
5929
|
}
|
|
5917
|
-
function setupRouter(urlSerializer, contexts, location, injector,
|
|
5918
|
-
const router = new Router(null, urlSerializer, contexts, location, injector,
|
|
5930
|
+
function setupRouter(urlSerializer, contexts, location, injector, compiler, config, opts = {}, urlHandlingStrategy, routeReuseStrategy) {
|
|
5931
|
+
const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
|
|
5919
5932
|
if (urlHandlingStrategy) {
|
|
5920
5933
|
router.urlHandlingStrategy = urlHandlingStrategy;
|
|
5921
5934
|
}
|
|
@@ -5955,6 +5968,9 @@ function assignExtraOptionsToRouter(opts, router) {
|
|
|
5955
5968
|
if (opts.urlUpdateStrategy) {
|
|
5956
5969
|
router.urlUpdateStrategy = opts.urlUpdateStrategy;
|
|
5957
5970
|
}
|
|
5971
|
+
if (opts.canceledNavigationResolution) {
|
|
5972
|
+
router.canceledNavigationResolution = opts.canceledNavigationResolution;
|
|
5973
|
+
}
|
|
5958
5974
|
}
|
|
5959
5975
|
function rootRoute(router) {
|
|
5960
5976
|
return router.routerState.root;
|
|
@@ -6038,12 +6054,11 @@ class RouterInitializer {
|
|
|
6038
6054
|
this.destroyed = true;
|
|
6039
6055
|
}
|
|
6040
6056
|
}
|
|
6041
|
-
RouterInitializer
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
];
|
|
6057
|
+
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterInitializer, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6058
|
+
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterInitializer });
|
|
6059
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-rc.1", ngImport: i0, type: RouterInitializer, decorators: [{
|
|
6060
|
+
type: Injectable
|
|
6061
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
6047
6062
|
function getAppInitializer(r) {
|
|
6048
6063
|
return r.appInitializer.bind(r);
|
|
6049
6064
|
}
|
|
@@ -6081,7 +6096,7 @@ function provideRouterInitializer() {
|
|
|
6081
6096
|
/**
|
|
6082
6097
|
* @publicApi
|
|
6083
6098
|
*/
|
|
6084
|
-
const VERSION = new Version('13.0.0-
|
|
6099
|
+
const VERSION = new Version('13.0.0-rc.1');
|
|
6085
6100
|
|
|
6086
6101
|
/**
|
|
6087
6102
|
* @license
|
|
@@ -6120,5 +6135,5 @@ const VERSION = new Version('13.0.0-next.7');
|
|
|
6120
6135
|
* Generated bundle index. Do not edit.
|
|
6121
6136
|
*/
|
|
6122
6137
|
|
|
6123
|
-
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS,
|
|
6124
|
-
//# sourceMappingURL=router.
|
|
6138
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten };
|
|
6139
|
+
//# sourceMappingURL=router.mjs.map
|