diff --git a/modules/@angular/router/build/es6/src/index.d.ts b/modules/@angular/router/build/es6/src/index.d.ts index 601ce3ec01..f0c682f846 100644 --- a/modules/@angular/router/build/es6/src/index.d.ts +++ b/modules/@angular/router/build/es6/src/index.d.ts @@ -1,4 +1,4 @@ -export { Router } from './router'; +export { Router, Event, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; diff --git a/modules/@angular/router/build/es6/src/index.js b/modules/@angular/router/build/es6/src/index.js index 2f183a1bcf..ffe29979a1 100644 --- a/modules/@angular/router/build/es6/src/index.js +++ b/modules/@angular/router/build/es6/src/index.js @@ -1,4 +1,4 @@ -export { Router } from './router'; +export { Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; @@ -8,4 +8,4 @@ export { provideRouter } from './router_providers'; import { RouterOutlet } from './directives/router_outlet'; import { RouterLink } from './directives/router_link'; export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink]; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxNQUFNLFFBQVEsVUFBVSxDQUFDO0FBQ2xDLFNBQVMsYUFBYSxFQUFFLG9CQUFvQixRQUFRLGtCQUFrQixDQUFDO0FBQ3ZFLFNBQVMsV0FBVyxFQUFFLGNBQWMsRUFBRSxtQkFBbUIsRUFBRSxzQkFBc0IsUUFBUSxnQkFBZ0Is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b3V0ZXJPdXRsZXQsIFJvdXRlckxpbmtdOyJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/router.d.ts b/modules/@angular/router/build/es6/src/router.d.ts index 8d2ce7d290..79f6a5a224 100644 --- a/modules/@angular/router/build/es6/src/router.d.ts +++ b/modules/@angular/router/build/es6/src/router.d.ts @@ -10,11 +10,35 @@ import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; +import 'rxjs/add/operator/concat'; +import 'rxjs/add/operator/concatMap'; export interface NavigationExtras { relativeTo?: ActivatedRoute; queryParameters?: Params; fragment?: string; } +export declare class NavigationStart { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationEnd { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationCancel { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationError { + id: number; + url: UrlTree; + error: any; + constructor(id: number, url: UrlTree, error: any); +} +export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError; export declare class Router { private rootComponentType; private resolver; @@ -26,16 +50,20 @@ export declare class Router { private currentRouterState; private config; private locationSubscription; + private routerEvents; + private navigationId; constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector); readonly routerState: RouterState; readonly urlTree: UrlTree; - navigateByUrl(url: string): Observable; + readonly events: Observable; + navigateByUrl(url: string): Promise; resetConfig(config: RouterConfig): void; dispose(): void; createUrlTree(commands: any[], {relativeTo, queryParameters, fragment}?: NavigationExtras): UrlTree; - navigate(commands: any[], extras?: NavigationExtras): Observable; + navigate(commands: any[], extras?: NavigationExtras): Promise; serializeUrl(url: UrlTree): string; parseUrl(url: string): UrlTree; + private scheduleNavigation(url, pop); private setUpLocationChangeListener(); - private runNavigate(url, pop?); + private runNavigate(url, pop, id); } diff --git a/modules/@angular/router/build/es6/src/router.js b/modules/@angular/router/build/es6/src/router.js index 22eff7a78a..907945ab99 100644 --- a/modules/@angular/router/build/es6/src/router.js +++ b/modules/@angular/router/build/es6/src/router.js @@ -8,11 +8,39 @@ import { PRIMARY_OUTLET } from './shared'; import { createEmptyState, ActivatedRoute, advanceActivatedRoute } from './router_state'; import { createUrlTree } from './create_url_tree'; import { forEach, and, shallowEqual } from './utils/collection'; +import { Subject } from 'rxjs/Subject'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; +import 'rxjs/add/operator/concat'; +import 'rxjs/add/operator/concatMap'; import { of } from 'rxjs/observable/of'; import { forkJoin } from 'rxjs/observable/forkJoin'; +export class NavigationStart { + constructor(id, url) { + this.id = id; + this.url = url; + } +} +export class NavigationEnd { + constructor(id, url) { + this.id = id; + this.url = url; + } +} +export class NavigationCancel { + constructor(id, url) { + this.id = id; + this.url = url; + } +} +export class NavigationError { + constructor(id, url, error) { + this.id = id; + this.url = url; + this.error = error; + } +} export class Router { constructor(rootComponentType, resolver, urlSerializer, outletMap, location, injector) { this.rootComponentType = rootComponentType; @@ -21,6 +49,8 @@ export class Router { this.outletMap = outletMap; this.location = location; this.injector = injector; + this.navigationId = 0; + this.routerEvents = new Subject(); this.currentUrlTree = createEmptyUrlTree(); this.currentRouterState = createEmptyState(rootComponentType); this.setUpLocationChangeListener(); @@ -32,9 +62,12 @@ export class Router { get urlTree() { return this.currentUrlTree; } + get events() { + return this.routerEvents; + } navigateByUrl(url) { const urlTree = this.urlSerializer.parse(url); - return this.runNavigate(urlTree, false); + return this.scheduleNavigation(urlTree, false); } resetConfig(config) { this.config = config; @@ -45,37 +78,54 @@ export class Router { return createUrlTree(a, this.currentUrlTree, commands, queryParameters, fragment); } navigate(commands, extras = {}) { - return this.runNavigate(this.createUrlTree(commands, extras)); + return this.scheduleNavigation(this.createUrlTree(commands, extras), false); } serializeUrl(url) { return this.urlSerializer.serialize(url); } parseUrl(url) { return this.urlSerializer.parse(url); } + scheduleNavigation(url, pop) { + const id = ++this.navigationId; + this.routerEvents.next(new NavigationStart(id, url)); + return Promise.resolve().then((_) => this.runNavigate(url, false, id)); + } setUpLocationChangeListener() { this.locationSubscription = this.location.subscribe((change) => { - this.runNavigate(this.urlSerializer.parse(change['url']), change['pop']); + return this.scheduleNavigation(this.urlSerializer.parse(change['url']), change['pop']); }); } - runNavigate(url, pop) { - let state; - const r = recognize(this.rootComponentType, this.config, url).mergeMap((newRouterStateSnapshot) => { - return resolve(this.resolver, newRouterStateSnapshot); - }).map((routerStateSnapshot) => { - return createRouterState(routerStateSnapshot, this.currentRouterState); - }).map((newState) => { - state = newState; - }).mergeMap(_ => { - return new GuardChecks(state.snapshot, this.currentRouterState.snapshot, this.injector).check(this.outletMap); + runNavigate(url, pop, id) { + if (id !== this.navigationId) { + this.routerEvents.next(new NavigationCancel(id, url)); + return Promise.resolve(false); + } + return new Promise((resolvePromise, rejectPromise) => { + let state; + recognize(this.rootComponentType, this.config, url).mergeMap((newRouterStateSnapshot) => { + return resolve(this.resolver, newRouterStateSnapshot); + }).map((routerStateSnapshot) => { + return createRouterState(routerStateSnapshot, this.currentRouterState); + }).map((newState) => { + state = newState; + }).mergeMap(_ => { + return new GuardChecks(state.snapshot, this.currentRouterState.snapshot, this.injector).check(this.outletMap); + }).forEach((shouldActivate) => { + if (!shouldActivate || id !== this.navigationId) { + this.routerEvents.next(new NavigationCancel(id, url)); + return Promise.resolve(false); + } + new ActivateRoutes(state, this.currentRouterState).activate(this.outletMap); + this.currentUrlTree = url; + this.currentRouterState = state; + if (!pop) { + this.location.go(this.urlSerializer.serialize(url)); + } + }).then(() => { + this.routerEvents.next(new NavigationEnd(id, url)); + resolvePromise(true); + }, e => { + this.routerEvents.next(new NavigationError(id, url, e)); + rejectPromise(e); + }); }); - r.subscribe((shouldActivate) => { - if (!shouldActivate) - return; - new ActivateRoutes(state, this.currentRouterState).activate(this.outletMap); - this.currentUrlTree = url; - this.currentRouterState = state; - if (!pop) { - this.location.go(this.urlSerializer.serialize(url)); - } - }); - return r; } } class CanActivate { @@ -250,4 +300,4 @@ function getOutlet(outletMap, route) { } return outlet; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FBTyxFQUFxQixrQkFBa0IsRUFBa0IsTUFBTSxlQUFlO09BRzlFLEVBQUUsZUFBZSxFQUFFLE1BQU0scUJBQXFCO09BQzlDLEVBQUUsU0FBUyxFQUFFLE1BQU0sYUFBYTtPQUNoQyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVc7T0FDNUIsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVCQUF1QjtPQUVsRCxFQUFXLGtCQUFrQixFQUFFLE1BQU0sWUFBWTtPQUNqRCxFQUFFLGNBQWMsRUFBVSxNQUFNLFVBQVU7T0FDMUMsRUFBRSxnQkFBZ0IsRUFBb0MsY0FBYyxFQUEwQixxQkFBcUIsRUFBQyxNQUFNLGdCQUFnQjtPQUcxSSxFQUFFLGFBQWEsRUFBRSxNQUFNLG1CQUFtQjtPQUMxQyxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsWUFBWSxFQUFFLE1BQU0sb0JBQW9CO09BR3hELHVCQUF1QjtPQUN2Qix3QkFBd0I7T0FDeEIsNEJBQTRCO09BQzVCLEVBQUMsRUFBRSxFQUFDLE1BQU0sb0JBQW9CO09BQzlCLEVBQUMsUUFBUSxFQUFDLE1BQU0sMEJBQTBCO0FBT2pEO0lBU0UsWUFBb0IsaUJBQXNCLEVBQVUsUUFBMkIsRUFBVSxhQUE0QixFQUFVLFNBQTBCLEVBQVUsUUFBa0IsRUFBVSxRQUFrQjtRQUE3TCxzQkFBaUIsR0FBakIsaUJBQWlCLENBQUs7UUFBVSxhQU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ob3V0bGV0TWFwOiBSb3V0ZXJPdXRsZXRNYXAsIHJvdXRlOiBBY3RpdmF0ZWRSb3V0ZSk6IFJvdXRlck91dGxldCB7XG4gIGxldCBvdXRsZXQgPSBvdXRsZXRNYXAuX291dGxldHNbcm91dGUub3V0bGV0XTtcbiAgaWYgKCFvdXRsZXQpIHtcbiAgICBpZiAocm91dGUub3V0bGV0ID09PSBQUklNQVJZX09VVExFVCkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBDYW5ub3QgZmluZCBwcmltYXJ5IG91dGxldGApO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYENhbm5vdCBmaW5kIHRoZSBvdXRsZXQgJHtyb3V0ZS5vdXRsZXR9YCk7XG4gICAgfVxuICB9XG4gIHJldHVybiBvdXRsZXQ7XG59XG4iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/index.d.ts b/modules/@angular/router/build/src/index.d.ts index 601ce3ec01..f0c682f846 100644 --- a/modules/@angular/router/build/src/index.d.ts +++ b/modules/@angular/router/build/src/index.d.ts @@ -1,4 +1,4 @@ -export { Router } from './router'; +export { Router, Event, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; diff --git a/modules/@angular/router/build/src/index.js b/modules/@angular/router/build/src/index.js index 19576f67af..6e03a0c2c2 100644 --- a/modules/@angular/router/build/src/index.js +++ b/modules/@angular/router/build/src/index.js @@ -1,6 +1,10 @@ "use strict"; var router_1 = require('./router'); exports.Router = router_1.Router; +exports.NavigationStart = router_1.NavigationStart; +exports.NavigationEnd = router_1.NavigationEnd; +exports.NavigationCancel = router_1.NavigationCancel; +exports.NavigationError = router_1.NavigationError; var url_serializer_1 = require('./url_serializer'); exports.UrlSerializer = url_serializer_1.UrlSerializer; exports.DefaultUrlSerializer = url_serializer_1.DefaultUrlSerializer; @@ -21,4 +25,4 @@ exports.provideRouter = router_providers_1.provideRouter; var router_outlet_1 = require('./directives/router_outlet'); var router_link_1 = require('./directives/router_link'); exports.ROUTER_DIRECTIVES = [router_outlet_1.RouterOutlet, router_link_1.RouterLink]; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHVCQUF1QixVQUFVLENBQUM7QUFBekIsaUNBQXlCO0FBQ2xDLCtCQUFvRCxrQkFBa0IsQ0FBQztBQUE5RCx1REFBYTtBQUFFLHFFQUErQztBQUN2RSw2QkFBeUYsZ0JBQWdCLENBQUM7QUFBakcsaURBQVc7QUFBRSx1REFBYztBQUFFLGlFQUFtQjtBQUFFLHVFQUErQztBQUMxRyx5QkFBbUMsWUFBWSxDQUFDO0FBQXZDLHFDQUFPO0FBQUUsMkNBQThCO0FBQ2hELGtDQUFnQyxxQkFBcUIsQ0FBQztBQUE3Qyw4REFBNkM7QUFFdEQsdUJBQXVDLFVBQVUsQ0FBQztBQUFqQyxpREFBaUM7QUFDbEQsaUNBQThCLG9CQUFvQixDQUFDO0FBQTFDLHlEQUEwQztBQUduRCw4QkFBNkIsNEJBQTRCLENBQUMsQ0FBQTtBQUMxRCw0QkFBMkIsMEJBQTBCLENBQUMsQ0FBQTtBQUV6Qyx5QkFBaUIsR0FBRyxDQUFDLDRCQUFZLEVBQUUsd0JBQVUsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgUm91dGVyIH0gZnJvbSAnLi9yb3V0ZXInO1xuZXhwb3J0IHsgVXJsU2VyaWFsaXplciwgRGVmYXVsdFVybFNlcmlhbGl6ZXIgfSBmcm9tICcuL3VybF9zZXJpYWxpemVyJztcbmV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XRNYXAgfSBmcm9tICcuL3JvdXRlcl9vdXRsZXRfbWFwJztcbmV4cG9ydCB7IFJvdXRlckNvbmZpZywgUm91dGUgfSBmcm9tICcuL2NvbmZpZyc7XG5leHBvcnQgeyBQYXJhbXMsIFBSSU1BUllfT1VUTEVUIH0gZnJvbSAnLi9zaGFyZWQnO1xuZXhwb3J0IHsgcHJvdmlkZVJvdXRlciB9IGZyb20gJy4vcm91dGVyX3Byb3ZpZGVycyc7XG5leHBvcnQgeyBDYW5BY3RpdmF0ZSwgQ2FuRGVhY3RpdmF0ZSB9IGZyb20gJy4vaW50ZXJmYWNlcyc7XG5cbmltcG9ydCB7IFJvdXRlck91dGxldCB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfb3V0bGV0JztcbmltcG9ydCB7IFJvdXRlckxpbmsgfSBmcm9tICcuL2RpcmVjdGl2ZXMvcm91dGVyX2xpbmsnO1xuXG5leHBvcnQgY29uc3QgUk9VVEVSX0RJUkVDVElWRVMgPSBbUm91dGVyT3V0bGV0LCBSb3V0ZXJMaW5rXTsiXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/router.d.ts b/modules/@angular/router/build/src/router.d.ts index 8d2ce7d290..79f6a5a224 100644 --- a/modules/@angular/router/build/src/router.d.ts +++ b/modules/@angular/router/build/src/router.d.ts @@ -10,11 +10,35 @@ import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; +import 'rxjs/add/operator/concat'; +import 'rxjs/add/operator/concatMap'; export interface NavigationExtras { relativeTo?: ActivatedRoute; queryParameters?: Params; fragment?: string; } +export declare class NavigationStart { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationEnd { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationCancel { + id: number; + url: UrlTree; + constructor(id: number, url: UrlTree); +} +export declare class NavigationError { + id: number; + url: UrlTree; + error: any; + constructor(id: number, url: UrlTree, error: any); +} +export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError; export declare class Router { private rootComponentType; private resolver; @@ -26,16 +50,20 @@ export declare class Router { private currentRouterState; private config; private locationSubscription; + private routerEvents; + private navigationId; constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector); readonly routerState: RouterState; readonly urlTree: UrlTree; - navigateByUrl(url: string): Observable; + readonly events: Observable; + navigateByUrl(url: string): Promise; resetConfig(config: RouterConfig): void; dispose(): void; createUrlTree(commands: any[], {relativeTo, queryParameters, fragment}?: NavigationExtras): UrlTree; - navigate(commands: any[], extras?: NavigationExtras): Observable; + navigate(commands: any[], extras?: NavigationExtras): Promise; serializeUrl(url: UrlTree): string; parseUrl(url: string): UrlTree; + private scheduleNavigation(url, pop); private setUpLocationChangeListener(); - private runNavigate(url, pop?); + private runNavigate(url, pop, id); } diff --git a/modules/@angular/router/build/src/router.js b/modules/@angular/router/build/src/router.js index 03da50d365..e8d716b32a 100644 --- a/modules/@angular/router/build/src/router.js +++ b/modules/@angular/router/build/src/router.js @@ -9,11 +9,47 @@ var shared_1 = require('./shared'); var router_state_1 = require('./router_state'); var create_url_tree_1 = require('./create_url_tree'); var collection_1 = require('./utils/collection'); +var Subject_1 = require('rxjs/Subject'); require('rxjs/add/operator/map'); require('rxjs/add/operator/scan'); require('rxjs/add/operator/mergeMap'); +require('rxjs/add/operator/concat'); +require('rxjs/add/operator/concatMap'); var of_1 = require('rxjs/observable/of'); var forkJoin_1 = require('rxjs/observable/forkJoin'); +var NavigationStart = (function () { + function NavigationStart(id, url) { + this.id = id; + this.url = url; + } + return NavigationStart; +}()); +exports.NavigationStart = NavigationStart; +var NavigationEnd = (function () { + function NavigationEnd(id, url) { + this.id = id; + this.url = url; + } + return NavigationEnd; +}()); +exports.NavigationEnd = NavigationEnd; +var NavigationCancel = (function () { + function NavigationCancel(id, url) { + this.id = id; + this.url = url; + } + return NavigationCancel; +}()); +exports.NavigationCancel = NavigationCancel; +var NavigationError = (function () { + function NavigationError(id, url, error) { + this.id = id; + this.url = url; + this.error = error; + } + return NavigationError; +}()); +exports.NavigationError = NavigationError; var Router = (function () { function Router(rootComponentType, resolver, urlSerializer, outletMap, location, injector) { this.rootComponentType = rootComponentType; @@ -22,6 +58,8 @@ var Router = (function () { this.outletMap = outletMap; this.location = location; this.injector = injector; + this.navigationId = 0; + this.routerEvents = new Subject_1.Subject(); this.currentUrlTree = url_tree_1.createEmptyUrlTree(); this.currentRouterState = router_state_1.createEmptyState(rootComponentType); this.setUpLocationChangeListener(); @@ -41,9 +79,16 @@ var Router = (function () { enumerable: true, configurable: true }); + Object.defineProperty(Router.prototype, "events", { + get: function () { + return this.routerEvents; + }, + enumerable: true, + configurable: true + }); Router.prototype.navigateByUrl = function (url) { var urlTree = this.urlSerializer.parse(url); - return this.runNavigate(urlTree, false); + return this.scheduleNavigation(urlTree, false); }; Router.prototype.resetConfig = function (config) { this.config = config; @@ -56,39 +101,57 @@ var Router = (function () { }; Router.prototype.navigate = function (commands, extras) { if (extras === void 0) { extras = {}; } - return this.runNavigate(this.createUrlTree(commands, extras)); + return this.scheduleNavigation(this.createUrlTree(commands, extras), false); }; Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); }; Router.prototype.parseUrl = function (url) { return this.urlSerializer.parse(url); }; + Router.prototype.scheduleNavigation = function (url, pop) { + var _this = this; + var id = ++this.navigationId; + this.routerEvents.next(new NavigationStart(id, url)); + return Promise.resolve().then(function (_) { return _this.runNavigate(url, false, id); }); + }; Router.prototype.setUpLocationChangeListener = function () { var _this = this; this.locationSubscription = this.location.subscribe(function (change) { - _this.runNavigate(_this.urlSerializer.parse(change['url']), change['pop']); + return _this.scheduleNavigation(_this.urlSerializer.parse(change['url']), change['pop']); }); }; - Router.prototype.runNavigate = function (url, pop) { + Router.prototype.runNavigate = function (url, pop, id) { var _this = this; - var state; - var r = recognize_1.recognize(this.rootComponentType, this.config, url).mergeMap(function (newRouterStateSnapshot) { - return resolve_1.resolve(_this.resolver, newRouterStateSnapshot); - }).map(function (routerStateSnapshot) { - return create_router_state_1.createRouterState(routerStateSnapshot, _this.currentRouterState); - }).map(function (newState) { - state = newState; - }).mergeMap(function (_) { - return new GuardChecks(state.snapshot, _this.currentRouterState.snapshot, _this.injector).check(_this.outletMap); + if (id !== this.navigationId) { + this.routerEvents.next(new NavigationCancel(id, url)); + return Promise.resolve(false); + } + return new Promise(function (resolvePromise, rejectPromise) { + var state; + recognize_1.recognize(_this.rootComponentType, _this.config, url).mergeMap(function (newRouterStateSnapshot) { + return resolve_1.resolve(_this.resolver, newRouterStateSnapshot); + }).map(function (routerStateSnapshot) { + return create_router_state_1.createRouterState(routerStateSnapshot, _this.currentRouterState); + }).map(function (newState) { + state = newState; + }).mergeMap(function (_) { + return new GuardChecks(state.snapshot, _this.currentRouterState.snapshot, _this.injector).check(_this.outletMap); + }).forEach(function (shouldActivate) { + if (!shouldActivate || id !== _this.navigationId) { + _this.routerEvents.next(new NavigationCancel(id, url)); + return Promise.resolve(false); + } + new ActivateRoutes(state, _this.currentRouterState).activate(_this.outletMap); + _this.currentUrlTree = url; + _this.currentRouterState = state; + if (!pop) { + _this.location.go(_this.urlSerializer.serialize(url)); + } + }).then(function () { + _this.routerEvents.next(new NavigationEnd(id, url)); + resolvePromise(true); + }, function (e) { + _this.routerEvents.next(new NavigationError(id, url, e)); + rejectPromise(e); + }); }); - r.subscribe(function (shouldActivate) { - if (!shouldActivate) - return; - new ActivateRoutes(state, _this.currentRouterState).activate(_this.outletMap); - _this.currentUrlTree = url; - _this.currentRouterState = state; - if (!pop) { - _this.location.go(_this.urlSerializer.serialize(url)); - } - }); - return r; }; return Router; }()); @@ -276,4 +339,4 @@ function getOutlet(outletMap, route) { } return outlet; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvd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NoaWxkcmVuQXNNYXAobm9kZTogVHJlZU5vZGU8YW55PnxudWxsKSB7XG4gIHJldHVybiBub2RlID9cbiAgICBub2RlLmNoaWxkcmVuLnJlZHVjZShcbiAgICAgIChtLCBjKSA9PiB7XG4gICAgICAgIG1bYy52YWx1ZS5vdXRsZXRdID0gYztcbiAgICAgICAgcmV0dXJuIG07XG4gICAgICB9LFxuICAgICAge30pIDpcbiAge307XG59XG5cbmZ1bmN0aW9uIGdldE91dGxldChvdXRsZXRNYXA6IFJvdXRlck91dGxldE1hcCwgcm91dGU6IEFjdGl2YXRlZFJvdXRlKTogUm91dGVyT3V0bGV0IHtcbiAgbGV0IG91dGxldCA9IG91dGxldE1hcC5fb3V0bGV0c1tyb3V0ZS5vdXRsZXRdO1xuICBpZiAoIW91dGxldCkge1xuICAgIGlmIChyb3V0ZS5vdXRsZXQgPT09IFBSSU1BUllfT1VUTEVUKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYENhbm5vdCBmaW5kIHByaW1hcnkgb3V0bGV0YCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGZpbmQgdGhlIG91dGxldCAke3JvdXRlLm91dGxldH1gKTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIG91dGxldDtcbn1cbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEscUJBQXNFLGVBQWUsQ0FBQyxDQUFBO0FBR3RGLGtDQUFnQyxxQkFBcUIsQ0FBQyxDQUFBO0FBQ3RELDBCQUEwQixhQUFhLENBQUMsQ0FBQTtBQUN4Qyx3QkFBd0IsV0FBVyxDQUFDLENBQUE7QUFDcEMsb0NBQWtDLHVCQUF1Qix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