@angular/router
Advanced tools
Comparing version 4.0.0-beta.1 to 4.0.0-beta.2
/** | ||
* @license Angular v4.0.0-beta.1 | ||
* @license Angular v4.0.0-beta.2 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v4.0.0-beta.1 | ||
* @license Angular v4.0.0-beta.2 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v4.0.0-beta.1 | ||
* @license Angular v4.0.0-beta.2 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/router", | ||
"version": "4.0.0-beta.1", | ||
"version": "4.0.0-beta.2", | ||
"description": "Angular - the routing library", | ||
@@ -24,7 +24,7 @@ "main": "bundles/router.umd.js", | ||
"peerDependencies": { | ||
"@angular/core": "4.0.0-beta.1", | ||
"@angular/common": "4.0.0-beta.1", | ||
"@angular/platform-browser": "4.0.0-beta.1", | ||
"@angular/core": "4.0.0-beta.2", | ||
"@angular/common": "4.0.0-beta.2", | ||
"@angular/platform-browser": "4.0.0-beta.2", | ||
"rxjs": "^5.0.1" | ||
} | ||
} |
@@ -331,3 +331,3 @@ /** | ||
((route))._loadedConfig = r; | ||
return of(new UrlSegmentGroup(segments, {})); | ||
return new UrlSegmentGroup(segments, {}); | ||
}); | ||
@@ -334,0 +334,0 @@ } |
@@ -38,3 +38,3 @@ /** | ||
function isMatrixParams(command) { | ||
return typeof command === 'object' && !command.outlets && !command.segmentPath; | ||
return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath; | ||
} | ||
@@ -86,3 +86,3 @@ /** | ||
} | ||
var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c.outlets; }); | ||
var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; }); | ||
if (cmdWithOutlet && cmdWithOutlet !== last(commands)) { | ||
@@ -120,3 +120,3 @@ throw new Error('{outlets:{}} has to be the last command'); | ||
var /** @type {?} */ res = commands.reduce(function (res, cmd, cmdIdx) { | ||
if (typeof cmd === 'object') { | ||
if (typeof cmd === 'object' && cmd != null) { | ||
if (cmd.outlets) { | ||
@@ -219,4 +219,5 @@ var /** @type {?} */ outlets_1 = {}; | ||
function getPath(command) { | ||
if (typeof command === 'object' && command.outlets) | ||
if (typeof command === 'object' && command != null && command.outlets) { | ||
return command.outlets[PRIMARY_OUTLET]; | ||
} | ||
return "" + command; | ||
@@ -223,0 +224,0 @@ } |
@@ -89,11 +89,11 @@ /** | ||
/** | ||
* @param {?} data | ||
* @param {?} commands | ||
* @return {?} | ||
*/ | ||
set: function (data) { | ||
if (Array.isArray(data)) { | ||
this.commands = data; | ||
set: function (commands) { | ||
if (commands != null) { | ||
this.commands = Array.isArray(commands) ? commands : [commands]; | ||
} | ||
else { | ||
this.commands = [data]; | ||
this.commands = []; | ||
} | ||
@@ -150,3 +150,3 @@ }, | ||
'routerLink': [{ type: Input },], | ||
'onClick': [{ type: HostListener, args: ['click', [],] },], | ||
'onClick': [{ type: HostListener, args: ['click',] },], | ||
}; | ||
@@ -210,11 +210,11 @@ return RouterLink; | ||
/** | ||
* @param {?} data | ||
* @param {?} commands | ||
* @return {?} | ||
*/ | ||
set: function (data) { | ||
if (Array.isArray(data)) { | ||
this.commands = data; | ||
set: function (commands) { | ||
if (commands != null) { | ||
this.commands = Array.isArray(commands) ? commands : [commands]; | ||
} | ||
else { | ||
this.commands = [data]; | ||
this.commands = []; | ||
} | ||
@@ -221,0 +221,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":":not(a)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute"},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",[]]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"a[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":":not(a)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute"},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",[]]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"a[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":":not(a)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute"},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"a[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":":not(a)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute"},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"a[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"../router_state","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}}}}] |
@@ -179,4 +179,5 @@ /** | ||
* component: TeamComponent, | ||
* route: ActivatedRouteSnapshot, | ||
* state: RouterStateSnapshot | ||
* currentRoute: ActivatedRouteSnapshot, | ||
* currentState: RouterStateSnapshot, | ||
* nextState: RouterStateSnapshot | ||
* ): Observable<boolean>|Promise<boolean>|boolean { | ||
@@ -218,3 +219,4 @@ * return this.permissions.canDeactivate(this.currentUser, route.params.id); | ||
* provide: 'canDeactivateTeam', | ||
* useValue: (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => true | ||
* useValue: (component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState: | ||
* RouterStateSnapshot, nextState: RouterStateSnapshot) => true | ||
* } | ||
@@ -229,3 +231,3 @@ * ] | ||
export interface CanDeactivate<T> { | ||
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean; | ||
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean; | ||
} | ||
@@ -232,0 +234,0 @@ /** |
@@ -491,18 +491,19 @@ /** | ||
if (route.snapshot) { | ||
if (!shallowEqual(route.snapshot.queryParams, route._futureSnapshot.queryParams)) { | ||
var /** @type {?} */ currentSnapshot = route.snapshot; | ||
route.snapshot = route._futureSnapshot; | ||
if (!shallowEqual(currentSnapshot.queryParams, route._futureSnapshot.queryParams)) { | ||
((route.queryParams)).next(route._futureSnapshot.queryParams); | ||
} | ||
if (route.snapshot.fragment !== route._futureSnapshot.fragment) { | ||
if (currentSnapshot.fragment !== route._futureSnapshot.fragment) { | ||
((route.fragment)).next(route._futureSnapshot.fragment); | ||
} | ||
if (!shallowEqual(route.snapshot.params, route._futureSnapshot.params)) { | ||
if (!shallowEqual(currentSnapshot.params, route._futureSnapshot.params)) { | ||
((route.params)).next(route._futureSnapshot.params); | ||
} | ||
if (!shallowEqualArrays(route.snapshot.url, route._futureSnapshot.url)) { | ||
if (!shallowEqualArrays(currentSnapshot.url, route._futureSnapshot.url)) { | ||
((route.url)).next(route._futureSnapshot.url); | ||
} | ||
if (!equalParamsAndUrlSegments(route.snapshot, route._futureSnapshot)) { | ||
if (!equalParamsAndUrlSegments(currentSnapshot, route._futureSnapshot)) { | ||
((route.data)).next(route._futureSnapshot.data); | ||
} | ||
route.snapshot = route._futureSnapshot; | ||
} | ||
@@ -509,0 +510,0 @@ else { |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"createEmptyState":{"__symbolic":"function"},"createEmptyStateSnapshot":{"__symbolic":"function"},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":129,"character":24},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"inheritedParamsDataResolve":{"__symbolic":"function"},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./url_tree","name":"UrlSegment"}]},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./config","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":245,"character":24},{"__symbolic":"reference","module":"./config","name":"Route"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"./config","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}]}],"toString":[{"__symbolic":"method"}]}},"advanceActivatedRoute":{"__symbolic":"function"},"equalParamsAndUrlSegments":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./utils/collection","name":"shallowEqual"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"params"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"params"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./url_tree","name":"equalSegments"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"url"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"url"}]}}}}},{"__symbolic":"module","version":1,"metadata":{"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"createEmptyState":{"__symbolic":"function"},"createEmptyStateSnapshot":{"__symbolic":"function"},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":129,"character":24},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"inheritedParamsDataResolve":{"__symbolic":"function"},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./url_tree","name":"UrlSegment"}]},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./config","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":245,"character":24},{"__symbolic":"reference","module":"./config","name":"Route"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"./config","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}]}],"toString":[{"__symbolic":"method"}]}},"advanceActivatedRoute":{"__symbolic":"function"},"equalParamsAndUrlSegments":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./utils/collection","name":"shallowEqual"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"params"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"params"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./url_tree","name":"equalSegments"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"url"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"url"}]}}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"createEmptyState":{"__symbolic":"function"},"createEmptyStateSnapshot":{"__symbolic":"function"},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":129,"character":24},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"inheritedParamsDataResolve":{"__symbolic":"function"},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./url_tree","name":"UrlSegment"}]},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./config","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":243,"character":24},{"__symbolic":"reference","module":"./config","name":"Route"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"./config","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}]}],"toString":[{"__symbolic":"method"}]}},"advanceActivatedRoute":{"__symbolic":"function"},"equalParamsAndUrlSegments":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./utils/collection","name":"shallowEqual"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"params"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"params"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./url_tree","name":"equalSegments"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"url"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"url"}]}}}}},{"__symbolic":"module","version":1,"metadata":{"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"createEmptyState":{"__symbolic":"function"},"createEmptyStateSnapshot":{"__symbolic":"function"},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","module":"rxjs/Observable","name":"Observable","arguments":[{"__symbolic":"reference","module":"./config","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":129,"character":24},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"inheritedParamsDataResolve":{"__symbolic":"function"},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./url_tree","name":"UrlSegment"}]},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","module":"./shared","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./config","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":243,"character":24},{"__symbolic":"reference","module":"./config","name":"Route"},{"__symbolic":"reference","module":"./url_tree","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"./config","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./utils/tree","name":"Tree"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"./utils/tree","name":"TreeNode","arguments":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}]}],"toString":[{"__symbolic":"method"}]}},"advanceActivatedRoute":{"__symbolic":"function"},"equalParamsAndUrlSegments":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./utils/collection","name":"shallowEqual"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"params"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"params"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./url_tree","name":"equalSegments"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"a"},"member":"url"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"b"},"member":"url"}]}}}}}] |
@@ -1051,6 +1051,7 @@ /** | ||
if (guard.canDeactivate) { | ||
observable = wrapIntoObservable(guard.canDeactivate(component, curr, _this.curr)); | ||
observable = | ||
wrapIntoObservable(guard.canDeactivate(component, curr, _this.curr, _this.future)); | ||
} | ||
else { | ||
observable = wrapIntoObservable(guard(component, curr, _this.curr)); | ||
observable = wrapIntoObservable(guard(component, curr, _this.curr, _this.future)); | ||
} | ||
@@ -1057,0 +1058,0 @@ return first.call(observable); |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
export var /** @type {?} */ VERSION = new Version('4.0.0-beta.1'); | ||
export var /** @type {?} */ VERSION = new Version('4.0.0-beta.2'); | ||
//# sourceMappingURL=version.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.1"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.1"]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.2"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.2"]}}}] |
@@ -9,4 +9,4 @@ /** | ||
import { __router_private__ as _ } from '@angular/router'; | ||
export declare var ROUTER_PROVIDERS: typeof _.ROUTER_PROVIDERS; | ||
export declare var ROUTES: typeof _.ROUTES; | ||
export declare var flatten: typeof _.flatten; | ||
export declare const ROUTER_PROVIDERS: typeof _.ROUTER_PROVIDERS; | ||
export declare const ROUTES: typeof _.ROUTES; | ||
export declare const flatten: typeof _.flatten; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1101764
15042