Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular/router

Package Overview
Dependencies
Maintainers
1
Versions
866
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.2.0 to 3.2.1

5

bundles/router-testing.umd.js
/**
* @license Angular v3.2.0
* @license Angular v3.2.1
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
*/(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :

@@ -8,0 +7,0 @@ typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :

/**
* @license Angular v3.2.0
* @license Angular v3.2.1
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
*/(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :

@@ -8,0 +7,0 @@ typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :

2

bundles/router-upgrade.umd.min.js
/**
* @license Angular v3.2.0
* @license Angular v3.2.1
* (c) 2010-2016 Google, Inc. https://angular.io/

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

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

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

"peerDependencies": {
"@angular/core": "2.2.0",
"@angular/common": "2.2.0",
"@angular/platform-browser": "2.2.0",
"@angular/upgrade": "2.2.0",
"@angular/core": "2.2.1",
"@angular/common": "2.2.1",
"@angular/platform-browser": "2.2.1",
"rxjs": "5.0.0-beta.12"
}
}

@@ -154,2 +154,5 @@ /**

*
* An empty path route inherits its parent's params and data. This is because it cannot have its
* own params, and, as a result, it often uses its parent's params and data as its own.
*
* ### Matching Strategy

@@ -220,3 +223,4 @@ *

* The router will also merge the `params`, `data`, and `resolve` of the componentless parent into
* the `params`, `data`, and `resolve` of the children.
* the `params`, `data`, and `resolve` of the children. This is done because there is no component
* that can inject the activated route of the componentless parent.
*

@@ -223,0 +227,0 @@ * This is especially useful when child components are defined as follows:

@@ -459,3 +459,3 @@ /**

Promise.resolve()
.then(function (_) { return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType)); })
.then(function (_) { return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot); })
.then(resolve, reject);

@@ -476,50 +476,64 @@ }

return new Promise(function (resolvePromise, rejectPromise) {
var state;
var navigationIsSuccessful;
var preActivation;
var appliedUrl;
var storedState = _this.currentRouterState;
var storedUrl = _this.currentUrlTree;
var routerState$;
// create an observable of the url and route state snapshot
// this operation do not result in any side effects
var urlAndSnapshot$;
if (!precreatedState) {
var redirectsApplied$ = applyRedirects(_this.injector, _this.configLoader, url, _this.config);
var snapshot$ = mergeMap.call(redirectsApplied$, function (u) {
appliedUrl = u;
return recognize(_this.rootComponentType, _this.config, appliedUrl, _this.serializeUrl(appliedUrl));
urlAndSnapshot$ = mergeMap.call(redirectsApplied$, function (appliedUrl) {
return map.call(recognize(_this.rootComponentType, _this.config, appliedUrl, _this.serializeUrl(appliedUrl)), function (snapshot) {
_this.routerEvents.next(new RoutesRecognized(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl), snapshot));
return { appliedUrl: appliedUrl, snapshot: snapshot };
});
});
var emitRecognzied$ = map.call(snapshot$, function (newRouterStateSnapshot) {
_this.routerEvents.next(new RoutesRecognized(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl), newRouterStateSnapshot));
return newRouterStateSnapshot;
});
routerState$ = map.call(emitRecognzied$, function (routerStateSnapshot) {
return createRouterState(routerStateSnapshot, _this.currentRouterState);
});
}
else {
appliedUrl = url;
routerState$ = of(precreatedState);
urlAndSnapshot$ = of({ appliedUrl: url, snapshot: precreatedState });
}
var preactivation$ = map.call(routerState$, function (newState) {
state = newState;
// run preactivation: guards and data resolvers
var preActivation;
var preactivationTraverse$ = map.call(urlAndSnapshot$, function (_a) {
var appliedUrl = _a.appliedUrl, snapshot = _a.snapshot;
preActivation =
new PreActivation(state.snapshot, _this.currentRouterState.snapshot, _this.injector);
new PreActivation(snapshot, _this.currentRouterState.snapshot, _this.injector);
preActivation.traverse(_this.outletMap);
return { appliedUrl: appliedUrl, snapshot: snapshot };
});
var preactivation2$ = mergeMap.call(preactivation$, function () {
var preactivationCheckGuards = mergeMap.call(preactivationTraverse$, function (_a) {
var appliedUrl = _a.appliedUrl, snapshot = _a.snapshot;
if (_this.navigationId !== id)
return of(false);
return preActivation.checkGuards();
return map.call(preActivation.checkGuards(), function (shouldActivate) {
return { appliedUrl: appliedUrl, snapshot: snapshot, shouldActivate: shouldActivate };
});
});
var resolveData$ = mergeMap.call(preactivation2$, function (shouldActivate) {
var preactivationResolveData$ = mergeMap.call(preactivationCheckGuards, function (p) {
if (_this.navigationId !== id)
return of(false);
if (p.shouldActivate) {
return map.call(preActivation.resolveData(), function () { return p; });
}
else {
return of(p);
}
});
// create router state
// this operation has side effects => route state is being affected
var routerState$ = map.call(preactivationResolveData$, function (_a) {
var appliedUrl = _a.appliedUrl, snapshot = _a.snapshot, shouldActivate = _a.shouldActivate;
if (shouldActivate) {
return map.call(preActivation.resolveData(), function () { return shouldActivate; });
var state = createRouterState(snapshot, _this.currentRouterState);
return { appliedUrl: appliedUrl, state: state, shouldActivate: shouldActivate };
}
else {
return of(shouldActivate);
return { appliedUrl: appliedUrl, state: null, shouldActivate: shouldActivate };
}
});
resolveData$
.forEach(function (shouldActivate) {
// applied the new router state
// this operation has side effects
var navigationIsSuccessful;
var storedState = _this.currentRouterState;
var storedUrl = _this.currentUrlTree;
routerState$
.forEach(function (_a) {
var appliedUrl = _a.appliedUrl, state = _a.state, shouldActivate = _a.shouldActivate;
if (!shouldActivate || id !== _this.navigationId) {

@@ -547,3 +561,3 @@ navigationIsSuccessful = false;

if (navigationIsSuccessful) {
_this.routerEvents.next(new NavigationEnd(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl)));
_this.routerEvents.next(new NavigationEnd(id, _this.serializeUrl(url), _this.serializeUrl(_this.currentUrlTree)));
resolvePromise(true);

@@ -550,0 +564,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

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