Socket
Socket
Sign inDemoInstall

@angular/router

Package Overview
Dependencies
Maintainers
1
Versions
853
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/router - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

bundles/router-testing.umd.js
/**
* @license Angular v3.0.1
* @license Angular v3.0.2
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -4,0 +4,0 @@ * License: MIT

{
"name": "@angular/router",
"version": "3.0.1",
"version": "3.0.2",
"description": "Angular - the routing library",

@@ -24,7 +24,7 @@ "main": "bundles/router.umd.js",

"peerDependencies": {
"@angular/core": "2.0.1",
"@angular/common": "2.0.1",
"@angular/platform-browser": "2.0.1",
"@angular/core": "2.0.2",
"@angular/common": "2.0.2",
"@angular/platform-browser": "2.0.2",
"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';

@@ -186,2 +186,12 @@ /**

/**
* @internal
* TODO: this should be removed once the constructor of the router made internal
*/
Router.prototype.resetRootComponentType = function (rootComponentType) {
this.rootComponentType = rootComponentType;
// TODO: vsavkin router 4.0 should make the root component set to null
// this will simplify the lifecycle of the router.
this.currentRouterState.root.component = this.rootComponentType;
};
/**
* Sets up the location change listener and performs the initial navigation.

@@ -188,0 +198,0 @@ */

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc