@angular/router 7.2.0-rc.0 → 7.2.3
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 +4 -4
- package/bundles/router-testing.umd.js.map +1 -1
- package/bundles/router-testing.umd.min.js +2 -2
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +4 -4
- package/bundles/router-upgrade.umd.js.map +1 -1
- package/bundles/router-upgrade.umd.min.js +2 -2
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +23 -13
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +20 -20
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/index.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/router.js +1 -1
- package/esm2015/src/apply_redirects.js +1 -1
- package/esm2015/src/components/empty_outlet.js +1 -1
- package/esm2015/src/config.js +1 -1
- package/esm2015/src/create_router_state.js +1 -1
- package/esm2015/src/create_url_tree.js +1 -1
- package/esm2015/src/directives/router_link.js +2 -2
- package/esm2015/src/directives/router_link_active.js +1 -1
- package/esm2015/src/directives/router_outlet.js +1 -1
- package/esm2015/src/events.js +1 -1
- package/esm2015/src/index.js +1 -1
- package/esm2015/src/interfaces.js +2 -2
- package/esm2015/src/operators/activate_routes.js +1 -1
- package/esm2015/src/operators/apply_redirects.js +1 -1
- package/esm2015/src/operators/check_guards.js +1 -1
- package/esm2015/src/operators/prioritized_guard_value.js +1 -1
- package/esm2015/src/operators/recognize.js +1 -1
- package/esm2015/src/operators/resolve_data.js +1 -1
- package/esm2015/src/operators/switch_tap.js +1 -1
- package/esm2015/src/private_export.js +1 -1
- package/esm2015/src/recognize.js +1 -1
- package/esm2015/src/route_reuse_strategy.js +1 -1
- package/esm2015/src/router.js +21 -6
- package/esm2015/src/router_config_loader.js +1 -1
- package/esm2015/src/router_module.js +1 -1
- package/esm2015/src/router_outlet_context.js +1 -1
- package/esm2015/src/router_preloader.js +1 -1
- package/esm2015/src/router_scroller.js +1 -1
- package/esm2015/src/router_state.js +1 -1
- package/esm2015/src/shared.js +1 -1
- package/esm2015/src/url_handling_strategy.js +1 -1
- package/esm2015/src/url_tree.js +1 -1
- package/esm2015/src/utils/collection.js +1 -1
- package/esm2015/src/utils/preactivation.js +1 -1
- package/esm2015/src/utils/tree.js +1 -1
- package/esm2015/src/utils/type_guards.js +1 -1
- package/esm2015/src/version.js +2 -2
- package/esm2015/testing/index.js +1 -1
- package/esm2015/testing/public_api.js +1 -1
- package/esm2015/testing/src/router_testing_module.js +1 -1
- package/esm2015/testing/src/testing.js +1 -1
- package/esm2015/testing/testing.js +1 -1
- package/esm2015/upgrade/index.js +1 -1
- package/esm2015/upgrade/public_api.js +1 -1
- package/esm2015/upgrade/src/upgrade.js +1 -1
- package/esm2015/upgrade/upgrade.js +1 -1
- package/esm5/index.js +1 -1
- package/esm5/public_api.js +1 -1
- package/esm5/router.js +1 -1
- package/esm5/src/apply_redirects.js +1 -1
- package/esm5/src/components/empty_outlet.js +1 -1
- package/esm5/src/config.js +1 -1
- package/esm5/src/create_router_state.js +1 -1
- package/esm5/src/create_url_tree.js +1 -1
- package/esm5/src/directives/router_link.js +2 -2
- package/esm5/src/directives/router_link_active.js +1 -1
- package/esm5/src/directives/router_outlet.js +1 -1
- package/esm5/src/events.js +1 -1
- package/esm5/src/index.js +1 -1
- package/esm5/src/interfaces.js +1 -1
- package/esm5/src/operators/activate_routes.js +1 -1
- package/esm5/src/operators/apply_redirects.js +1 -1
- package/esm5/src/operators/check_guards.js +1 -1
- package/esm5/src/operators/prioritized_guard_value.js +1 -1
- package/esm5/src/operators/recognize.js +1 -1
- package/esm5/src/operators/resolve_data.js +1 -1
- package/esm5/src/operators/switch_tap.js +1 -1
- package/esm5/src/private_export.js +1 -1
- package/esm5/src/recognize.js +1 -1
- package/esm5/src/route_reuse_strategy.js +1 -1
- package/esm5/src/router.js +16 -6
- package/esm5/src/router_config_loader.js +1 -1
- package/esm5/src/router_module.js +1 -1
- package/esm5/src/router_outlet_context.js +1 -1
- package/esm5/src/router_preloader.js +1 -1
- package/esm5/src/router_scroller.js +1 -1
- package/esm5/src/router_state.js +1 -1
- package/esm5/src/shared.js +1 -1
- package/esm5/src/url_handling_strategy.js +1 -1
- package/esm5/src/url_tree.js +1 -1
- package/esm5/src/utils/collection.js +1 -1
- package/esm5/src/utils/preactivation.js +1 -1
- package/esm5/src/utils/tree.js +1 -1
- package/esm5/src/utils/type_guards.js +1 -1
- package/esm5/src/version.js +2 -2
- package/esm5/testing/index.js +1 -1
- package/esm5/testing/public_api.js +1 -1
- package/esm5/testing/src/router_testing_module.js +1 -1
- package/esm5/testing/src/testing.js +1 -1
- package/esm5/testing/testing.js +1 -1
- package/esm5/upgrade/index.js +1 -1
- package/esm5/upgrade/public_api.js +1 -1
- package/esm5/upgrade/src/upgrade.js +1 -1
- package/esm5/upgrade/upgrade.js +1 -1
- package/fesm2015/router.js +22 -12
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +4 -4
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm2015/upgrade.js.map +1 -1
- package/fesm5/router.js +22 -12
- package/fesm5/router.js.map +1 -1
- package/fesm5/testing.js +4 -4
- package/fesm5/testing.js.map +1 -1
- package/fesm5/upgrade.js +1 -1
- package/fesm5/upgrade.js.map +1 -1
- package/package.json +4 -4
- package/router.metadata.json +1 -1
- package/src/config.d.ts +2 -1
- package/src/directives/router_link.d.ts +1 -1
- package/src/interfaces.d.ts +1 -1
- package/src/router.d.ts +1 -0
- package/testing.d.ts +2 -3
- package/upgrade.d.ts +2 -3
package/fesm2015/router.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.2.
|
|
2
|
+
* @license Angular v7.2.3
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { LocationStrategy, Location, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';
|
|
8
|
+
import { Component, ɵisObservable, ɵisPromise, NgModuleRef, InjectionToken, NgModuleFactory, ɵConsole, NgZone, isDevMode, Directive, Attribute, Renderer2, ElementRef, Input, HostListener, HostBinding, ChangeDetectorRef, ContentChildren, EventEmitter, ViewContainerRef, ComponentFactoryResolver, Output, Injectable, NgModuleFactoryLoader, Compiler, Injector, ApplicationRef, Optional, SystemJsNgModuleLoader, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Version } from '@angular/core';
|
|
9
|
+
import { of, from, BehaviorSubject, EmptyError, Observable, combineLatest, defer, Subject, EMPTY } from 'rxjs';
|
|
10
|
+
import { map, concatAll, last, catchError, first, mergeMap, every, switchMap, take, startWith, scan, filter, concatMap, reduce, tap, finalize, mergeAll } from 'rxjs/operators';
|
|
11
11
|
import { ɵgetDOM } from '@angular/platform-browser';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -5028,6 +5028,7 @@ class Router {
|
|
|
5028
5028
|
this.resetConfig(config);
|
|
5029
5029
|
this.currentUrlTree = createEmptyUrlTree();
|
|
5030
5030
|
this.rawUrlTree = this.currentUrlTree;
|
|
5031
|
+
this.browserUrlTree = this.currentUrlTree;
|
|
5031
5032
|
this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);
|
|
5032
5033
|
this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);
|
|
5033
5034
|
this.transitions = new BehaviorSubject({
|
|
@@ -5084,7 +5085,7 @@ class Router {
|
|
|
5084
5085
|
let errored = false;
|
|
5085
5086
|
return of(t).pipe(switchMap(t => {
|
|
5086
5087
|
/** @type {?} */
|
|
5087
|
-
const urlTransition = !this.navigated || t.extractedUrl.toString() !== this.
|
|
5088
|
+
const urlTransition = !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();
|
|
5088
5089
|
/** @type {?} */
|
|
5089
5090
|
const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
|
|
5090
5091
|
this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
|
|
@@ -5112,8 +5113,14 @@ class Router {
|
|
|
5112
5113
|
// Recognize
|
|
5113
5114
|
recognize$1(this.rootComponentType, this.config, (url) => this.serializeUrl(url), this.paramsInheritanceStrategy, this.relativeLinkResolution),
|
|
5114
5115
|
// Update URL if in `eager` update mode
|
|
5115
|
-
tap(t =>
|
|
5116
|
-
this.
|
|
5116
|
+
tap(t => {
|
|
5117
|
+
if (this.urlUpdateStrategy === 'eager') {
|
|
5118
|
+
if (!t.extras.skipLocationChange) {
|
|
5119
|
+
this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);
|
|
5120
|
+
}
|
|
5121
|
+
this.browserUrlTree = t.urlAfterRedirects;
|
|
5122
|
+
}
|
|
5123
|
+
}),
|
|
5117
5124
|
// Fire RoutesRecognized
|
|
5118
5125
|
tap(t => {
|
|
5119
5126
|
/** @type {?} */
|
|
@@ -5226,8 +5233,11 @@ class Router {
|
|
|
5226
5233
|
this.currentUrlTree = t.urlAfterRedirects;
|
|
5227
5234
|
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
|
|
5228
5235
|
((/** @type {?} */ (this))).routerState = (/** @type {?} */ (t.targetRouterState));
|
|
5229
|
-
if (this.urlUpdateStrategy === 'deferred'
|
|
5230
|
-
|
|
5236
|
+
if (this.urlUpdateStrategy === 'deferred') {
|
|
5237
|
+
if (!t.extras.skipLocationChange) {
|
|
5238
|
+
this.setBrowserUrl(this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);
|
|
5239
|
+
}
|
|
5240
|
+
this.browserUrlTree = t.urlAfterRedirects;
|
|
5231
5241
|
}
|
|
5232
5242
|
}), activateRoutes(this.rootContexts, this.routeReuseStrategy, (evt) => this.triggerEvent(evt)), tap({ /**
|
|
5233
5243
|
* @return {?}
|
|
@@ -5785,7 +5795,7 @@ function validateCommands(commands) {
|
|
|
5785
5795
|
* </a>
|
|
5786
5796
|
* ```
|
|
5787
5797
|
*
|
|
5788
|
-
* You can tell the directive
|
|
5798
|
+
* You can tell the directive how to handle queryParams. Available options are:
|
|
5789
5799
|
* - `'merge'`: merge the queryParams into the current queryParams
|
|
5790
5800
|
* - `'preserve'`: preserve the current queryParams
|
|
5791
5801
|
* - default/`''`: use the queryParams only
|
|
@@ -7262,7 +7272,7 @@ function provideRouterInitializer() {
|
|
|
7262
7272
|
* \@publicApi
|
|
7263
7273
|
* @type {?}
|
|
7264
7274
|
*/
|
|
7265
|
-
const VERSION = new Version('7.2.
|
|
7275
|
+
const VERSION = new Version('7.2.3');
|
|
7266
7276
|
|
|
7267
7277
|
/**
|
|
7268
7278
|
* @fileoverview added by tsickle
|