fix(router): don't use ParamsInheritanceStrategy in declarations (#21574)

ParamsInheritanceStrategy is internal, so any references to it from the
published .d.ts files will fail.

Fixes #21456.

PR Close #21574
This commit is contained in:
Patrick Shields 2018-01-16 15:09:51 -06:00 committed by Miško Hevery
parent d0e086a5fe
commit 925e654a29
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ import {reduce} from 'rxjs/operator/reduce';
import {LoadedRouterConfig, ResolveData, RunGuardsAndResolvers} from './config'; import {LoadedRouterConfig, ResolveData, RunGuardsAndResolvers} from './config';
import {ActivationStart, ChildActivationStart, Event} from './events'; import {ActivationStart, ChildActivationStart, Event} from './events';
import {ChildrenOutletContexts, OutletContext} from './router_outlet_context'; import {ChildrenOutletContexts, OutletContext} from './router_outlet_context';
import {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, equalParamsAndUrlSegments, inheritedParamsDataResolve} from './router_state'; import {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments, inheritedParamsDataResolve} from './router_state';
import {andObservables, forEach, shallowEqual, wrapIntoObservable} from './utils/collection'; import {andObservables, forEach, shallowEqual, wrapIntoObservable} from './utils/collection';
import {TreeNode, nodeChildrenAsMap} from './utils/tree'; import {TreeNode, nodeChildrenAsMap} from './utils/tree';
@ -63,7 +63,7 @@ export class PreActivation {
(canDeactivate: boolean) => canDeactivate ? this.runCanActivateChecks() : of (false)); (canDeactivate: boolean) => canDeactivate ? this.runCanActivateChecks() : of (false));
} }
resolveData(paramsInheritanceStrategy: ParamsInheritanceStrategy): Observable<any> { resolveData(paramsInheritanceStrategy: 'emptyOnly'|'always'): Observable<any> {
if (!this.isActivating()) return of (null); if (!this.isActivating()) return of (null);
const checks$ = from(this.canActivateChecks); const checks$ = from(this.canActivateChecks);
const runningChecks$ = concatMap.call( const runningChecks$ = concatMap.call(
@ -308,7 +308,7 @@ export class PreActivation {
private runResolve( private runResolve(
future: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,
paramsInheritanceStrategy: ParamsInheritanceStrategy): Observable<any> { paramsInheritanceStrategy: 'emptyOnly'|'always'): Observable<any> {
const resolve = future._resolve; const resolve = future._resolve;
return map.call(this.resolveNode(resolve, future), (resolvedData: any): any => { return map.call(this.resolveNode(resolve, future), (resolvedData: any): any => {
future._resolvedData = resolvedData; future._resolvedData = resolvedData;