@angular/router
Advanced tools
Comparing version 3.1.0-beta.0 to 3.1.0-rc.0
/** | ||
* @license Angular v3.1.0-beta.0 | ||
* @license Angular v3.1.0-rc.0 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/router", | ||
"version": "3.1.0-beta.0", | ||
"version": "3.1.0-rc.0", | ||
"description": "Angular - the routing library", | ||
@@ -24,7 +24,7 @@ "main": "bundles/router.umd.js", | ||
"peerDependencies": { | ||
"@angular/core": "2.1.0-beta.0", | ||
"@angular/common": "2.1.0-beta.0", | ||
"@angular/platform-browser": "2.1.0-beta.0", | ||
"@angular/core": "2.1.0-rc.0", | ||
"@angular/common": "2.1.0-rc.0", | ||
"@angular/platform-browser": "2.1.0-rc.0", | ||
"rxjs": "5.0.0-beta.12" | ||
} | ||
} |
@@ -61,3 +61,3 @@ /** | ||
* component: Chat | ||
* outlet: aux | ||
* outlet: 'aux' | ||
* }] | ||
@@ -64,0 +64,0 @@ * ``` |
@@ -83,3 +83,4 @@ /** | ||
private update(); | ||
private reduceList(q); | ||
private isLinkActive(router); | ||
private hasActiveLink(); | ||
} |
@@ -104,12 +104,15 @@ /** | ||
return; | ||
var isActiveLinks = this.reduceList(this.links); | ||
var isActiveLinksWithHrefs = this.reduceList(this.linksWithHrefs); | ||
this.classes.forEach(function (c) { return _this.renderer.setElementClass(_this.element.nativeElement, c, isActiveLinks || isActiveLinksWithHrefs); }); | ||
var isActive = this.hasActiveLink(); | ||
this.classes.forEach(function (c) { return _this.renderer.setElementClass(_this.element.nativeElement, c, isActive); }); | ||
}; | ||
RouterLinkActive.prototype.reduceList = function (q) { | ||
RouterLinkActive.prototype.isLinkActive = function (router) { | ||
var _this = this; | ||
return q.reduce(function (res, link) { | ||
return res || _this.router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact); | ||
}, false); | ||
return function (link) { | ||
return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact); | ||
}; | ||
}; | ||
RouterLinkActive.prototype.hasActiveLink = function () { | ||
return this.links.some(this.isLinkActive(this.router)) || | ||
this.linksWithHrefs.some(this.isLinkActive(this.router)); | ||
}; | ||
RouterLinkActive.decorators = [ | ||
@@ -116,0 +119,0 @@ { type: Directive, args: [{ selector: '[routerLinkActive]' },] }, |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[routerLinkActive]"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren"},"arguments":[{"__symbolic":"reference","module":"./router_link","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren"},"arguments":[{"__symbolic":"reference","module":"./router_link","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"reduceList":[{"__symbolic":"method"}]}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[routerLinkActive]"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren"},"arguments":[{"__symbolic":"reference","module":"./router_link","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren"},"arguments":[{"__symbolic":"reference","module":"./router_link","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"isLinkActive":[{"__symbolic":"method"}],"hasActiveLink":[{"__symbolic":"method"}]}}}} |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { ROUTES } from './router_config_loader'; | ||
@@ -2,0 +9,0 @@ import { ROUTER_PROVIDERS } from './router_module'; |
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
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
808604
10884