diff --git a/modules/@angular/router/build/es6/src/common_router_providers.js b/modules/@angular/router/build/es6/src/common_router_providers.js index bd05ec2c58..b189f9ae0e 100644 --- a/modules/@angular/router/build/es6/src/common_router_providers.js +++ b/modules/@angular/router/build/es6/src/common_router_providers.js @@ -2,7 +2,7 @@ import { RouterOutletMap } from './router_outlet_map'; import { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; import { ActivatedRoute } from './router_state'; import { Router } from './router'; -import { ComponentResolver, ApplicationRef } from '@angular/core'; +import { ComponentResolver, ApplicationRef, Injector } from '@angular/core'; import { LocationStrategy, PathLocationStrategy, Location } from '@angular/common'; export function provideRouter(config) { return [ @@ -11,20 +11,20 @@ export function provideRouter(config) { { provide: UrlSerializer, useClass: DefaultUrlSerializer }, { provide: Router, - useFactory: (ref, resolver, urlSerializer, outletMap, location) => { + useFactory: (ref, resolver, urlSerializer, outletMap, location, injector) => { if (ref.componentTypes.length == 0) { throw new Error("Bootstrap at least one component before injecting Router."); } const componentType = ref.componentTypes[0]; - const r = new Router(componentType, resolver, urlSerializer, outletMap, location); + const r = new Router(componentType, resolver, urlSerializer, outletMap, location, injector); r.resetConfig(config); ref.registerDisposeListener(() => r.dispose()); return r; }, - deps: [ApplicationRef, ComponentResolver, UrlSerializer, RouterOutletMap, Location] + deps: [ApplicationRef, ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector] }, RouterOutletMap, { provide: ActivatedRoute, useFactory: (r) => r.routerState.root, deps: [Router] }, ]; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3JvdXRlcl9wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tbW9uX3JvdXRlcl9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUI7T0FDOUMsRUFBRSxhQUFh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5qZWN0b3IpO1xuICAgICAgICByLnJlc2V0Q29uZmlnKGNvbmZpZyk7XG4gICAgICAgIHJlZi5yZWdpc3RlckRpc3Bvc2VMaXN0ZW5lcigoKSA9PiByLmRpc3Bvc2UoKSk7XG4gICAgICAgIHJldHVybiByO1xuICAgICAgfSxcbiAgICAgIGRlcHM6IFtBcHBsaWNhdGlvblJlZiwgQ29tcG9uZW50UmVzb2x2ZXIsIFVybFNlcmlhbGl6ZXIsIFJvdXRlck91dGxldE1hcCwgTG9jYXRpb24sIEluamVjdG9yXVxuICAgIH0sXG5cbiAgICBSb3V0ZXJPdXRsZXRNYXAsXG4gICAge3Byb3ZpZGU6IEFjdGl2YXRlZFJvdXRlLCB1c2VGYWN0b3J5OiAocikgPT4gci5yb3V0ZXJTdGF0ZS5yb290LCBkZXBzOiBbUm91dGVyXX0sXG4gIF07XG59XG4iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/config.d.ts b/modules/@angular/router/build/es6/src/config.d.ts index d0f5b418d6..2074d71163 100644 --- a/modules/@angular/router/build/es6/src/config.d.ts +++ b/modules/@angular/router/build/es6/src/config.d.ts @@ -5,5 +5,7 @@ export interface Route { path?: string; component: Type | string; outlet?: string; + canActivate?: any[]; + canDeactivate?: any[]; children?: Route[]; } diff --git a/modules/@angular/router/build/es6/src/config.js b/modules/@angular/router/build/es6/src/config.js index bc64eabff3..1d0208cc76 100644 --- a/modules/@angular/router/build/es6/src/config.js +++ b/modules/@angular/router/build/es6/src/config.js @@ -1 +1 @@ -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2hpbGRyZW4/OiBSb3V0ZVtdO1xufSJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2FuQWN0aXZhdGU/OiBhbnlbXSxcbiAgY2FuRGVhY3RpdmF0ZT86IGFueVtdLFxuICBjaGlsZHJlbj86IFJvdXRlW107XG59Il19 \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/create_router_state.d.ts b/modules/@angular/router/build/es6/src/create_router_state.d.ts new file mode 100644 index 0000000000..4ff54a3c73 --- /dev/null +++ b/modules/@angular/router/build/es6/src/create_router_state.d.ts @@ -0,0 +1,2 @@ +import { RouterStateSnapshot, RouterState } from './router_state'; +export declare function createRouterState(curr: RouterStateSnapshot, prevState: RouterState): RouterState; diff --git a/modules/@angular/router/build/es6/src/create_router_state.js b/modules/@angular/router/build/es6/src/create_router_state.js new file mode 100644 index 0000000000..649da2865f --- /dev/null +++ b/modules/@angular/router/build/es6/src/create_router_state.js @@ -0,0 +1,40 @@ +import { RouterState, ActivatedRoute } from './router_state'; +import { TreeNode } from './utils/tree'; +import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +export function createRouterState(curr, prevState) { + const root = createNode(curr._root, prevState ? prevState._root : undefined); + const queryParams = prevState ? prevState.queryParams : new BehaviorSubject(curr.queryParams); + const fragment = prevState ? prevState.fragment : new BehaviorSubject(curr.fragment); + return new RouterState(root, queryParams, fragment, curr); +} +function createNode(curr, prevState) { + if (prevState && equalRouteSnapshots(prevState.value.snapshot, curr.value)) { + const value = prevState.value; + value._futureSnapshot = curr.value; + const children = createOrReuseChildren(curr, prevState); + return new TreeNode(value, children); + } + else { + const value = createActivatedRoute(curr.value); + const children = curr.children.map(c => createNode(c)); + return new TreeNode(value, children); + } +} +function createOrReuseChildren(curr, prevState) { + return curr.children.map(child => { + const index = prevState.children.findIndex(p => equalRouteSnapshots(p.value.snapshot, child.value)); + if (index >= 0) { + return createNode(child, prevState.children[index]); + } + else { + return createNode(child); + } + }); +} +function createActivatedRoute(c) { + return new ActivatedRoute(new BehaviorSubject(c.urlSegments), new BehaviorSubject(c.params), c.outlet, c.component, c); +} +function equalRouteSnapshots(a, b) { + return a._routeConfig === b._routeConfig; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX3JvdXRlcl9zdGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jcmVhdGVfcm91dGVyX3N0YXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUFPLEVBQStDLFdBQVcsRUFBRSxjQUFjLEVBQUUsTUFBTSxnQkFBZ0I7T0FDbEcsRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjO09BQ2hDLEVBQUUsZUFBZSxFQUFFLE1BQU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GNvbnN0IGluZGV4ID0gcHJldlN0YXRlLmNoaWxkcmVuLmZpbmRJbmRleChwID0+IGVxdWFsUm91dGVTbmFwc2hvdHMocC52YWx1ZS5zbmFwc2hvdCwgY2hpbGQudmFsdWUpKTtcbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgcmV0dXJuIGNyZWF0ZU5vZGUoY2hpbGQsIHByZXZTdGF0ZS5jaGlsZHJlbltpbmRleF0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gY3JlYXRlTm9kZShjaGlsZCk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gY3JlYXRlQWN0aXZhdGVkUm91dGUoYzpBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90KSB7XG4gIHJldHVybiBuZXcgQWN0aXZhdGVkUm91dGUobmV3IEJlaGF2aW9yU3ViamVjdChjLnVybFNlZ21lbnRzKSwgbmV3IEJlaGF2aW9yU3ViamVjdChjLnBhcmFtcyksIGMub3V0bGV0LCBjLmNvbXBvbmVudCwgYyk7XG59XG5cbmZ1bmN0aW9uIGVxdWFsUm91dGVTbmFwc2hvdHMoYTogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgYjogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCk6IGJvb2xlYW4ge1xuICByZXR1cm4gYS5fcm91dGVDb25maWcgPT09IGIuX3JvdXRlQ29uZmlnO1xufSJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/create_url_tree.js b/modules/@angular/router/build/es6/src/create_url_tree.js index e08b1586c8..575e656fcf 100644 --- a/modules/@angular/router/build/es6/src/create_url_tree.js +++ b/modules/@angular/router/build/es6/src/create_url_tree.js @@ -1,10 +1,10 @@ import { UrlTree, UrlSegment } from './url_tree'; -import { TreeNode, rootNode } from './utils/tree'; +import { TreeNode } from './utils/tree'; import { forEach, shallowEqual } from './utils/collection'; import { PRIMARY_OUTLET } from './shared'; export function createUrlTree(route, urlTree, commands, queryParameters, fragment) { if (commands.length === 0) { - return tree(rootNode(urlTree), urlTree, queryParameters, fragment); + return tree(urlTree._root, urlTree, queryParameters, fragment); } const normalizedCommands = normalizeCommands(commands); if (navigateToRoot(normalizedCommands)) { @@ -14,7 +14,7 @@ export function createUrlTree(route, urlTree, commands, queryParameters, fragmen const updated = normalizedCommands.commands.length > 0 ? updateMany(startingNode.children.slice(0), normalizedCommands.commands) : []; - const newRoot = constructNewTree(rootNode(urlTree), startingNode, updated); + const newRoot = constructNewTree(urlTree._root, startingNode, updated); return tree(newRoot, urlTree, queryParameters, fragment); } function tree(root, urlTree, queryParameters, fragment) { @@ -73,16 +73,15 @@ function normalizeCommands(commands) { } function findStartingNode(normalizedChange, urlTree, route) { if (normalizedChange.isAbsolute) { - return rootNode(urlTree); + return urlTree._root; } else { const urlSegment = findUrlSegment(route, urlTree, normalizedChange.numberOfDoubleDots); - return findMatchingNode(urlSegment, rootNode(urlTree)); + return findMatchingNode(urlSegment, urlTree._root); } } function findUrlSegment(route, urlTree, numberOfDoubleDots) { - const segments = route.urlSegments.value; - const urlSegment = segments[segments.length - 1]; + const urlSegment = route.snapshot._lastUrlSegment; const path = urlTree.pathFromRoot(urlSegment); if (path.length <= numberOfDoubleDots) { throw new Error("Invalid number of '../'"); @@ -182,4 +181,4 @@ function recurse(urlSegment, node, rest) { const children = node ? node.children.slice(0) : []; return new TreeNode(urlSegment, updateMany(children, rest)); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX3VybF90cmVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NyZWF0ZV91cmxfdHJlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FBTyxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQW9CLE1BQU0sWUFBWTtPQUMzRCxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjO09BQzFDL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0aDogc3RyaW5nLCBwYXJhbXM6IHtba2V5OiBzdHJpbmddOiBhbnl9LCBzZWdtZW50OiBVcmxTZWdtZW50KTogYm9vbGVhbiB7XG4gIHJldHVybiBwYXRoID09IHNlZ21lbnQucGF0aCAmJiBzaGFsbG93RXF1YWwocGFyYW1zLCBzZWdtZW50LnBhcmFtZXRlcnMpO1xufVxuXG5mdW5jdGlvbiByZWN1cnNlKHVybFNlZ21lbnQ6IFVybFNlZ21lbnQsIG5vZGU6IFRyZWVOb2RlPFVybFNlZ21lbnQ+IHwgbnVsbCxcbiAgICAgICAgICAgICAgICAgIHJlc3Q6IGFueVtdKTogVHJlZU5vZGU8VXJsU2VnbWVudD4ge1xuICBpZiAocmVzdC5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gbmV3IFRyZWVOb2RlPFVybFNlZ21lbnQ+KHVybFNlZ21lbnQsIFtdKTtcbiAgfVxuICBjb25zdCBjaGlsZHJlbiA9IG5vZGUgPyBub2RlLmNoaWxkcmVuLnNsaWNlKDApIDogW107XG4gIHJldHVybiBuZXcgVHJlZU5vZGU8VXJsU2VnbWVudD4odXJsU2VnbWVudCwgdXBkYXRlTWFueShjaGlsZHJlbiwgcmVzdCkpO1xufSJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX3VybF90cmVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NyZWF0ZV91cmxfdHJlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FBTyxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQW9CLE1BQU0sWUFBWTtPQUMzRCxFQUFFLFFBQVEsRUFBRSxNQUFNLGNBQWM7T0FDaEMsRUFBRSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sb0JBQW9CO09BRW5ELEVBQVUsY0FBYyxFQUFFLE1BQU0sVUFBVTtB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G51bGwsXG4gICAgICAgICAgICAgICAgICByZXN0OiBhbnlbXSk6IFRyZWVOb2RlPFVybFNlZ21lbnQ+IHtcbiAgaWYgKHJlc3QubGVuZ3RoID09PSAwKSB7XG4gICAgcmV0dXJuIG5ldyBUcmVlTm9kZTxVcmxTZWdtZW50Pih1cmxTZWdtZW50LCBbXSk7XG4gIH1cbiAgY29uc3QgY2hpbGRyZW4gPSBub2RlID8gbm9kZS5jaGlsZHJlbi5zbGljZSgwKSA6IFtdO1xuICByZXR1cm4gbmV3IFRyZWVOb2RlPFVybFNlZ21lbnQ+KHVybFNlZ21lbnQsIHVwZGF0ZU1hbnkoY2hpbGRyZW4sIHJlc3QpKTtcbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/directives/router_link.js b/modules/@angular/router/build/es6/src/directives/router_link.js index 14ec38401e..513d9923ec 100644 --- a/modules/@angular/router/build/es6/src/directives/router_link.js +++ b/modules/@angular/router/build/es6/src/directives/router_link.js @@ -62,4 +62,4 @@ RouterLink = __decorate([ Directive({ selector: '[routerLink]' }), __metadata('design:paramtypes', [Router, ActivatedRoute]) ], RouterLink); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2xpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZGlyZWN0aXZlcy9yb3V0ZXJfbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7T0FBTyxFQUNMLFNBQVMsRUFDVCxZQUFZLEVBQ1osV0FBVyxFQUNYLEtBQUssRUFDTixNQUFNLGVBQWU7T0FDZixFQUFDLE1BQU0sRUFBQyxNQUFNLFdBQVc7T0FDekIsRUFBQyxjQUFjLEVBQUMsTUFBTSxpQkFBaUI7QUE0QjlDO0lBT0UsWUFBb0IsTUFBYyxFQUFVLEtBQXFCO1FBQTdDLFdBQU0sR0FBTixNQUFNLENBQVE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bHNlIHtcbiAgICAgIHRoaXMuY29tbWFuZHMgPSBbZGF0YV07XG4gICAgfVxuICAgIHRoaXMudXBkYXRlVGFyZ2V0VXJsQW5kSHJlZigpO1xuICB9XG4gIFxuICBASG9zdExpc3RlbmVyKFwiY2xpY2tcIilcbiAgb25DbGljaygpOiBib29sZWFuIHtcbiAgICAvLyBJZiBubyB0YXJnZXQsIG9yIGlmIHRhcmdldCBpcyBfc2VsZiwgcHJldmVudCBkZWZhdWx0IGJyb3dzZXIgYmVoYXZpb3JcbiAgICBpZiAoISh0eXBlb2YgdGhpcy50YXJnZXQgPT09IFwic3RyaW5nXCIpIHx8IHRoaXMudGFyZ2V0ID09ICdfc2VsZicpIHtcbiAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlKHRoaXMuY29tbWFuZHMsIHtyZWxhdGl2ZVRvOiB0aGlzLnJvdXRlfSk7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG5cbiAgcHJpdmF0ZSB1cGRhdGVUYXJnZXRVcmxBbmRIcmVmKCk6IHZvaWQge1xuICAgIGNvbnN0IHRyZWUgPSB0aGlzLnJvdXRlci5jcmVhdGVVcmxUcmVlKHRoaXMuY29tbWFuZHMsIHtyZWxhdGl2ZVRvOiB0aGlzLnJvdXRlfSk7XG4gICAgaWYgKHRyZWUpIHtcbiAgICAgIHRoaXMuaHJlZiA9IHRoaXMucm91dGVyLnNlcmlhbGl6ZVVybCh0cmVlKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/directives/router_outlet.d.ts b/modules/@angular/router/build/es6/src/directives/router_outlet.d.ts index bfddeddb4b..d67ccb3f79 100644 --- a/modules/@angular/router/build/es6/src/directives/router_outlet.d.ts +++ b/modules/@angular/router/build/es6/src/directives/router_outlet.d.ts @@ -6,6 +6,7 @@ export declare class RouterOutlet { outletMap: RouterOutletMap; constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, name: string); readonly isActivated: boolean; + readonly component: Object; deactivate(): void; activate(factory: ComponentFactory, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void; } diff --git a/modules/@angular/router/build/es6/src/directives/router_outlet.js b/modules/@angular/router/build/es6/src/directives/router_outlet.js index e43821d1a5..6843004bdf 100644 --- a/modules/@angular/router/build/es6/src/directives/router_outlet.js +++ b/modules/@angular/router/build/es6/src/directives/router_outlet.js @@ -19,6 +19,11 @@ export let RouterOutlet = class RouterOutlet { parentOutletMap.registerOutlet(name ? name : PRIMARY_OUTLET, this); } get isActivated() { return !!this.activated; } + get component() { + if (!this.activated) + throw new Error("Outlet is not activated"); + return this.activated.instance; + } deactivate() { if (this.activated) { this.activated.destroy(); @@ -27,7 +32,7 @@ export let RouterOutlet = class RouterOutlet { } activate(factory, providers, outletMap) { this.outletMap = outletMap; - let inj = ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector); + const inj = ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector); this.activated = this.location.createComponent(factory, this.location.length, inj, []); } }; @@ -36,4 +41,4 @@ RouterOutlet = __decorate([ __param(2, Attribute('name')), __metadata('design:paramtypes', [RouterOutletMap, ViewContainerRef, String]) ], RouterOutlet); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O09BQU8sRUFBQyxTQUFTLEVBQUUsZ0JBQWdCLEVBQUUsU0FBUyxFQUE4RCxrQkFBa0IsRUFBQyxNQUFNLGVBQWU7T0FDN0ksRUFBQyxlQUFlLEVBQUMsTUFBTSxzQkFBc0I7T0FDN0MsRUFBQyxjQUFjLEVBQUMsT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29tcG9uZW50KCk6IE9iamVjdCB7XG4gICAgaWYgKCF0aGlzLmFjdGl2YXRlZCkgdGhyb3cgbmV3IEVycm9yKFwiT3V0bGV0IGlzIG5vdCBhY3RpdmF0ZWRcIik7XG4gICAgcmV0dXJuIHRoaXMuYWN0aXZhdGVkLmluc3RhbmNlO1xuICB9XG5cbiAgZGVhY3RpdmF0ZSgpOiB2b2lkIHtcbiAgICBpZiAodGhpcy5hY3RpdmF0ZWQpIHtcbiAgICAgIHRoaXMuYWN0aXZhdGVkLmRlc3Ryb3koKTtcbiAgICAgIHRoaXMuYWN0aXZhdGVkID0gbnVsbDtcbiAgICB9XG4gIH1cblxuICBhY3RpdmF0ZShmYWN0b3J5OiBDb21wb25lbnRGYWN0b3J5PGFueT4sIHByb3ZpZGVyczogUmVzb2x2ZWRSZWZsZWN0aXZlUHJvdmlkZXJbXSxcbiAgICAgICAgICAgb3V0bGV0TWFwOiBSb3V0ZXJPdXRsZXRNYXApOiB2b2lkIHtcbiAgICB0aGlzLm91dGxldE1hcCA9IG91dGxldE1hcDtcbiAgICBjb25zdCBpbmogPSBSZWZsZWN0aXZlSW5qZWN0b3IuZnJvbVJlc29sdmVkUHJvdmlkZXJzKHByb3ZpZGVycywgdGhpcy5sb2NhdGlvbi5wYXJlbnRJbmplY3Rvcik7XG4gICAgdGhpcy5hY3RpdmF0ZWQgPSB0aGlzLmxvY2F0aW9uLmNyZWF0ZUNvbXBvbmVudChmYWN0b3J5LCB0aGlzLmxvY2F0aW9uLmxlbmd0aCwgaW5qLCBbXSk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/index.d.ts b/modules/@angular/router/build/es6/src/index.d.ts index fa2554c9bb..601ce3ec01 100644 --- a/modules/@angular/router/build/es6/src/index.d.ts +++ b/modules/@angular/router/build/es6/src/index.d.ts @@ -1,11 +1,12 @@ export { Router } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; -export { RouterState, ActivatedRoute } from './router_state'; +export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; export { RouterOutletMap } from './router_outlet_map'; export { RouterConfig, Route } from './config'; export { Params, PRIMARY_OUTLET } from './shared'; export { provideRouter } from './router_providers'; +export { CanActivate, CanDeactivate } from './interfaces'; import { RouterOutlet } from './directives/router_outlet'; import { RouterLink } from './directives/router_link'; export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink)[]; diff --git a/modules/@angular/router/build/es6/src/index.js b/modules/@angular/router/build/es6/src/index.js index 4a2400603e..2f183a1bcf 100644 --- a/modules/@angular/router/build/es6/src/index.js +++ b/modules/@angular/router/build/es6/src/index.js @@ -1,6 +1,6 @@ export { Router } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; -export { RouterState, ActivatedRoute } from './router_state'; +export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; export { RouterOutletMap } from './router_outlet_map'; export { PRIMARY_OUTLET } from './shared'; @@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxNQUFNLFFBQVEsVUFBVSxDQUFDO0FBQ2xDLFNBQVMsYUFBYSxFQUFFLG9CQUFvQixRQUFRLGtCQUFrQixDQUFDO0FBQ3ZFLFNBQVMsV0FBVyxFQUFFLGNBQWMsUUFBUSxnQkFBZ0IsQ0FBQztBQUM3RCxTQUFTLE9BQU8sRUFBRSx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ZXJTdGF0ZVNuYXBzaG90LCBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90IH0gZnJvbSAnLi9yb3V0ZXJfc3RhdGUnO1xuZXhwb3J0IHsgVXJsVHJlZSwgVXJsU2VnbWVudH0gZnJvbSAnLi91cmxfdHJlZSc7XG5leHBvcnQgeyBSb3V0ZXJPdXRsZXRNYXAgfSBmcm9tICcuL3JvdXRlcl9vdXRsZXRfbWFwJztcbmV4cG9ydCB7IFJvdXRlckNvbmZpZywgUm91dGUgfSBmcm9tICcuL2NvbmZpZyc7XG5leHBvcnQgeyBQYXJhbXMsIFBSSU1BUllfT1VUTEVUIH0gZnJvbSAnLi9zaGFyZWQnO1xuZXhwb3J0IHsgcHJvdmlkZVJvdXRlciB9IGZyb20gJy4vcm91dGVyX3Byb3ZpZGVycyc7XG5leHBvcnQgeyBDYW5BY3RpdmF0ZSwgQ2FuRGVhY3RpdmF0ZSB9IGZyb20gJy4vaW50ZXJmYWNlcyc7XG5cbmltcG9ydCB7IFJvdXRlck91dGxldCB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfb3V0bGV0JztcbmltcG9ydCB7IFJvdXRlckxpbmsgfSBmcm9tICcuL2RpcmVjdGl2ZXMvcm91dGVyX2xpbmsnO1xuXG5leHBvcnQgY29uc3QgUk9VVEVSX0RJUkVDVElWRVMgPSBbUm91dGVyT3V0bGV0LCBSb3V0ZXJMaW5rXTsiXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/interfaces.d.ts b/modules/@angular/router/build/es6/src/interfaces.d.ts new file mode 100644 index 0000000000..ded9c1ede9 --- /dev/null +++ b/modules/@angular/router/build/es6/src/interfaces.d.ts @@ -0,0 +1,8 @@ +import { Observable } from 'rxjs/Observable'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from './router_state'; +export interface CanActivate { + canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean; +} +export interface CanDeactivate { + canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean; +} diff --git a/modules/@angular/router/build/es6/src/interfaces.js b/modules/@angular/router/build/es6/src/interfaces.js new file mode 100644 index 0000000000..39aff3b19f --- /dev/null +++ b/modules/@angular/router/build/es6/src/interfaces.js @@ -0,0 +1 @@ +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge09ic2VydmFibGV9IGZyb20gJ3J4anMvT2JzZXJ2YWJsZSc7XG5pbXBvcnQge0FjdGl2YXRlZFJvdXRlU25hcHNob3QsIFJvdXRlclN0YXRlU25hcHNob3R9IGZyb20gJy4vcm91dGVyX3N0YXRlJztcblxuLyoqXG4gKiBBbiBpbnRlcmZhY2UgYSBjbGFzcyBjYW4gaW1wbGVtZW50IHRvIGJlIGEgZ3VhcmQgZGVjaWRpbmcgaWYgYSByb3V0ZSBjYW4gYmUgYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkFjdGl2YXRlIHtcbiAgY2FuQWN0aXZhdGUocm91dGU6QWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6Um91dGVyU3RhdGVTbmFwc2hvdCk6T2JzZXJ2YWJsZTxib29sZWFuPiB8IGJvb2xlYW47XG59XG5cbi8qKlxuICogQW4gaW50ZXJmYWNlIGEgY2xhc3MgY2FuIGltcGxlbWVudCB0byBiZSBhIGd1YXJkIGRlY2lkaW5nIGlmIGEgcm91dGUgY2FuIGJlIGRlYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkRlYWN0aXZhdGU8VD4ge1xuICBjYW5EZWFjdGl2YXRlKGNvbXBvbmVudDpULCByb3V0ZTpBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LCBzdGF0ZTpSb3V0ZXJTdGF0ZVNuYXBzaG90KTpPYnNlcnZhYmxlPGJvb2xlYW4+IHwgYm9vbGVhbjtcbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/recognize.d.ts b/modules/@angular/router/build/es6/src/recognize.d.ts index 64aeb9f2f7..fbfa415c1f 100644 --- a/modules/@angular/router/build/es6/src/recognize.d.ts +++ b/modules/@angular/router/build/es6/src/recognize.d.ts @@ -1,5 +1,6 @@ import { UrlTree } from './url_tree'; -import { RouterState } from './router_state'; +import { RouterStateSnapshot } from './router_state'; import { RouterConfig } from './config'; +import { Type } from '@angular/core'; import { Observable } from 'rxjs/Observable'; -export declare function recognize(config: RouterConfig, url: UrlTree, existingState: RouterState): Observable; +export declare function recognize(rootComponentType: Type, config: RouterConfig, url: UrlTree): Observable; diff --git a/modules/@angular/router/build/es6/src/recognize.js b/modules/@angular/router/build/es6/src/recognize.js index 5bfb6a2326..88bd4fee6a 100644 --- a/modules/@angular/router/build/es6/src/recognize.js +++ b/modules/@angular/router/build/es6/src/recognize.js @@ -1,16 +1,13 @@ import { flatten, first, merge } from './utils/collection'; -import { TreeNode, rootNode } from './utils/tree'; -import { RouterState, ActivatedRoute } from './router_state'; +import { TreeNode } from './utils/tree'; +import { RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; import { PRIMARY_OUTLET } from './shared'; import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; -export function recognize(config, url, existingState) { +export function recognize(rootComponentType, config, url) { try { - const match = new MatchResult(existingState.root.component, config, [url.root], {}, rootNode(url).children, [], PRIMARY_OUTLET); - existingState.queryParams.next(url.queryParameters); - existingState.fragment.next(url.fragment); - const roots = constructActivatedRoute(match, rootNode(existingState)); - const res = new RouterState(roots[0], existingState.queryParams, existingState.fragment); + const match = new MatchResult(rootComponentType, config, [url.root], {}, url._root.children, [], PRIMARY_OUTLET, null, url.root); + const roots = constructActivatedRoute(match); + const res = new RouterStateSnapshot(roots[0], url.queryParameters, url.fragment); return new Observable(obs => { obs.next(res); obs.complete(); @@ -20,38 +17,36 @@ export function recognize(config, url, existingState) { return new Observable(obs => obs.error(e)); } } -function constructActivatedRoute(match, existingRoute) { - const activatedRoute = createOrReuseRoute(match, existingRoute); - const existingChildren = existingRoute ? existingRoute.children : []; - if (match.leftOverUrl.length > 0) { - const children = recognizeMany(match.children, match.leftOverUrl, existingChildren); - checkOutletNameUniqueness(children); - return [new TreeNode(activatedRoute, children)]; - } - else { - return [new TreeNode(activatedRoute, [])]; - } +function constructActivatedRoute(match) { + const activatedRoute = createActivatedRouteSnapshot(match); + const children = match.leftOverUrl.length > 0 ? + recognizeMany(match.children, match.leftOverUrl) : recognizeLeftOvers(match.children, match.lastUrlSegment); + checkOutletNameUniqueness(children); + children.sort((a, b) => { + if (a.value.outlet === PRIMARY_OUTLET) + return -1; + if (b.value.outlet === PRIMARY_OUTLET) + return 1; + return a.value.outlet.localeCompare(b.value.outlet); + }); + return [new TreeNode(activatedRoute, children)]; } -function recognizeMany(config, urls, existingRoutes) { - return flatten(urls.map(url => recognizeOne(config, url, existingRoutes))); +function recognizeLeftOvers(config, lastUrlSegment) { + if (!config) + return []; + const mIndex = matchIndex(config, [], lastUrlSegment); + return mIndex ? constructActivatedRoute(mIndex) : []; } -function createOrReuseRoute(match, existing) { - if (existing) { - const v = existing.value; - if (v.component === match.component && v.outlet === match.outlet) { - (v.params).next(match.parameters); - (v.urlSegments).next(match.consumedUrlSegments); - return v; - } - } - return new ActivatedRoute(new BehaviorSubject(match.consumedUrlSegments), new BehaviorSubject(match.parameters), match.outlet, match.component); +function recognizeMany(config, urls) { + return flatten(urls.map(url => recognizeOne(config, url))); } -function recognizeOne(config, url, existingRoutes) { - let m = match(config, url); - const routesWithRightOutlet = existingRoutes.filter(r => r.value.outlet == m.outlet); - const routeWithRightOutlet = routesWithRightOutlet.length > 0 ? routesWithRightOutlet[0] : null; - const primary = constructActivatedRoute(m, routeWithRightOutlet); - const secondary = recognizeMany(config, m.secondary, existingRoutes); +function createActivatedRouteSnapshot(match) { + return new ActivatedRouteSnapshot(match.consumedUrlSegments, match.parameters, match.outlet, match.component, match.route, match.lastUrlSegment); +} +function recognizeOne(config, url) { + const m = match(config, url); + const primary = constructActivatedRoute(m); + const secondary = recognizeMany(config, m.secondary); const res = primary.concat(secondary); checkOutletNameUniqueness(res); return res; @@ -61,8 +56,8 @@ function checkOutletNameUniqueness(nodes) { nodes.forEach(n => { let routeWithSameOutletName = names[n.value.outlet]; if (routeWithSameOutletName) { - const p = routeWithSameOutletName.urlSegments.value.map(s => s.toString()).join("/"); - const c = n.value.urlSegments.value.map(s => s.toString()).join("/"); + const p = routeWithSameOutletName.urlSegments.map(s => s.toString()).join("/"); + const c = n.value.urlSegments.map(s => s.toString()).join("/"); throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`); } names[n.value.outlet] = n.value; @@ -73,7 +68,7 @@ function match(config, url) { const m = matchNonIndex(config, url); if (m) return m; - const mIndex = matchIndex(config, url); + const mIndex = matchIndex(config, [url], url.value); if (mIndex) return mIndex; const availableRoutes = config.map(r => { @@ -90,12 +85,12 @@ function matchNonIndex(config, url) { } return null; } -function matchIndex(config, url) { +function matchIndex(config, leftOverUrls, lastUrlSegment) { for (let r of config) { if (r.index) { const outlet = r.outlet ? r.outlet : PRIMARY_OUTLET; const children = r.children ? r.children : []; - return new MatchResult(r.component, children, [], {}, [url], [], outlet); + return new MatchResult(r.component, children, [], lastUrlSegment.parameters, leftOverUrls, [], outlet, r, lastUrlSegment); } } return null; @@ -114,7 +109,7 @@ function matchWithParts(route, url) { u = first(u.children); } const last = consumedUrl[consumedUrl.length - 1]; - return new MatchResult(route.component, [], consumedUrl, last.parameters, [], [], PRIMARY_OUTLET); + return new MatchResult(route.component, [], consumedUrl, last.parameters, [], [], PRIMARY_OUTLET, route, last); } const parts = path.split("/"); const positionalParams = {}; @@ -150,10 +145,10 @@ function matchWithParts(route, url) { const secondarySubtrees = lastParent ? lastParent.children.slice(1) : []; const children = route.children ? route.children : []; const outlet = route.outlet ? route.outlet : PRIMARY_OUTLET; - return new MatchResult(route.component, children, consumedUrlSegments, parameters, lastSegment.children, secondarySubtrees, outlet); + return new MatchResult(route.component, children, consumedUrlSegments, parameters, lastSegment.children, secondarySubtrees, outlet, route, lastSegment.value); } class MatchResult { - constructor(component, children, consumedUrlSegments, parameters, leftOverUrl, secondary, outlet) { + constructor(component, children, consumedUrlSegments, parameters, leftOverUrl, secondary, outlet, route, lastUrlSegment) { this.component = component; this.children = children; this.consumedUrlSegments = consumedUrlSegments; @@ -161,6 +156,8 @@ class MatchResult { this.leftOverUrl = leftOverUrl; this.secondary = secondary; this.outlet = outlet; + this.route = route; + this.lastUrlSegment = lastUrlSegment; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb2duaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlY29nbml6ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FDTyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sb0JBQW9CO09BQ25ELEVBQUUsUUFBUSxFQUFFLFFBQVEsRUFBRSxNQUFNLGNBQWM7T0FDMUMsRUFBRSxXQUFXLEVBQUUsY0FBYyxFQUFFLE1BQU0sZ0JBQWdCO09BQ3JELEVBQVUsY0FBYyxFQUFFLE1BQU0sVUFBVTtPQUcxQyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlCQUFpQjtPQUNyQyxFQUFFLGVBQWUsRUFBRSxNQUFNLHNCQUFzQjtBQUV0RCwwQkFBMEIsTUFBb0IsRUFBRSxHQUFZLEVBQUUsYUFBMEI7SUFDdEYsSUFBSSxDQUFDO1FBQ0gsTUFBTSxLQUFLLEdBQU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lwZSB8IHN0cmluZyxcbiAgICAgICAgICAgICAgcHVibGljIGNoaWxkcmVuOiBSb3V0ZVtdLFxuICAgICAgICAgICAgICBwdWJsaWMgY29uc3VtZWRVcmxTZWdtZW50czogVXJsU2VnbWVudFtdLFxuICAgICAgICAgICAgICBwdWJsaWMgcGFyYW1ldGVyczoge1trZXk6IHN0cmluZ106IHN0cmluZ30sXG4gICAgICAgICAgICAgIHB1YmxpYyBsZWZ0T3ZlclVybDogVHJlZU5vZGU8VXJsU2VnbWVudD5bXSxcbiAgICAgICAgICAgICAgcHVibGljIHNlY29uZGFyeTogVHJlZU5vZGU8VXJsU2VnbWVudD5bXSxcbiAgICAgICAgICAgICAgcHVibGljIG91dGxldDogc3RyaW5nLFxuICAgICAgICAgICAgICBwdWJsaWMgcm91dGU6IFJvdXRlIHwgbnVsbCxcbiAgICAgICAgICAgICAgcHVibGljIGxhc3RVcmxTZWdtZW50OiBVcmxTZWdtZW50XG4gICkge31cbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/resolve.d.ts b/modules/@angular/router/build/es6/src/resolve.d.ts new file mode 100644 index 0000000000..edd764fbc7 --- /dev/null +++ b/modules/@angular/router/build/es6/src/resolve.d.ts @@ -0,0 +1,6 @@ +import { RouterStateSnapshot } from './router_state'; +import { ComponentResolver } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/toPromise'; +export declare function resolve(resolver: ComponentResolver, state: RouterStateSnapshot): Observable; diff --git a/modules/@angular/router/build/es6/src/resolve.js b/modules/@angular/router/build/es6/src/resolve.js new file mode 100644 index 0000000000..d66341025d --- /dev/null +++ b/modules/@angular/router/build/es6/src/resolve.js @@ -0,0 +1,23 @@ +import 'rxjs/add/operator/map'; +import { forkJoin } from 'rxjs/observable/forkJoin'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import 'rxjs/add/operator/toPromise'; +export function resolve(resolver, state) { + return resolveNode(resolver, state._root).map(_ => state); +} +function resolveNode(resolver, node) { + if (node.children.length === 0) { + return fromPromise(resolver.resolveComponent(node.value.component).then(factory => { + node.value._resolvedComponentFactory = factory; + return node.value; + })); + } + else { + const c = node.children.map(c => resolveNode(resolver, c).toPromise()); + return forkJoin(c).map(_ => resolver.resolveComponent(node.value.component).then(factory => { + node.value._resolvedComponentFactory = factory; + return node.value; + })); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZXNvbHZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUlPLHVCQUF1QjtPQUN2QixFQUFDLFFBQVEsRUFBQyxNQUFNLDBCQUEwQjtPQUMxQyxFQUFDLFdBQVcsRUFBQyxNQUFNLDZCQUE2QjtPQUNoRCw2QkFBNkI7QUFFcEMsd0JBQXdCLFFBQTJCLEVBQUUsS0FBMEI7SUFDN0UsTUFBTSxDQUFDLFdBQVcsQ0FBQyxRQUFRLEVBQUUsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksS0FBSyxDQUFDLENBQUM7QUFDNUQsQ0FBQztBQUVELHFCQUFxQixRQUEyQixFQUFFLElBQXNDO0lBQ3RGLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDL0IsTUFBTSxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQU0sSUFBSSxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQyxJQUFJLENBQUMsT0FBTztZQUNsRixJQUFJLENBQUMsS0FBSyxDQUFDLHlCQUF5QixHQUFHLE9BQU8sQ0FBQztZQUMvQyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQU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W50RmFjdG9yeSA9IGZhY3Rvcnk7XG4gICAgICByZXR1cm4gbm9kZS52YWx1ZTtcbiAgICB9KSk7XG4gIH1cbn0iXX0= \ 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 7fd1b6a794..8d2ce7d290 100644 --- a/modules/@angular/router/build/es6/src/router.d.ts +++ b/modules/@angular/router/build/es6/src/router.d.ts @@ -1,4 +1,4 @@ -import { ComponentResolver } from '@angular/core'; +import { ComponentResolver, Type, Injector } from '@angular/core'; import { Location } from '@angular/common'; import { UrlSerializer } from './url_serializer'; import { RouterOutletMap } from './router_outlet_map'; @@ -8,24 +8,25 @@ import { RouterState, ActivatedRoute } from './router_state'; import { RouterConfig } from './config'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; -import 'rxjs/add/operator/toPromise'; export interface NavigationExtras { relativeTo?: ActivatedRoute; queryParameters?: Params; fragment?: string; } export declare class Router { - private rootComponent; + private rootComponentType; private resolver; private urlSerializer; private outletMap; private location; + private injector; private currentUrlTree; private currentRouterState; private config; private locationSubscription; - constructor(rootComponent: Object, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location); + constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector); readonly routerState: RouterState; readonly urlTree: UrlTree; navigateByUrl(url: string): Observable; diff --git a/modules/@angular/router/build/es6/src/router.js b/modules/@angular/router/build/es6/src/router.js index 32029bef2a..22eff7a78a 100644 --- a/modules/@angular/router/build/es6/src/router.js +++ b/modules/@angular/router/build/es6/src/router.js @@ -1,26 +1,28 @@ import { ReflectiveInjector } from '@angular/core'; import { RouterOutletMap } from './router_outlet_map'; import { recognize } from './recognize'; -import { rootNode } from './utils/tree'; +import { resolve } from './resolve'; +import { createRouterState } from './create_router_state'; import { createEmptyUrlTree } from './url_tree'; import { PRIMARY_OUTLET } from './shared'; -import { createEmptyState, ActivatedRoute } from './router_state'; +import { createEmptyState, ActivatedRoute, advanceActivatedRoute } from './router_state'; import { createUrlTree } from './create_url_tree'; -import { forEach } from './utils/collection'; +import { forEach, and, shallowEqual } from './utils/collection'; import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; -import 'rxjs/add/operator/toPromise'; -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { of } from 'rxjs/observable/of'; import { forkJoin } from 'rxjs/observable/forkJoin'; export class Router { - constructor(rootComponent, resolver, urlSerializer, outletMap, location) { - this.rootComponent = rootComponent; + constructor(rootComponentType, resolver, urlSerializer, outletMap, location, injector) { + this.rootComponentType = rootComponentType; this.resolver = resolver; this.urlSerializer = urlSerializer; this.outletMap = outletMap; this.location = location; + this.injector = injector; this.currentUrlTree = createEmptyUrlTree(); - this.currentRouterState = createEmptyState(rootComponent.constructor); + this.currentRouterState = createEmptyState(rootComponentType); this.setUpLocationChangeListener(); this.navigateByUrl(this.location.path()); } @@ -53,51 +55,156 @@ export class Router { }); } runNavigate(url, pop) { - const r = recognize(this.config, url, this.currentRouterState).mergeMap((newState) => { - return new ActivateRoutes(this.resolver, newState, this.currentRouterState).activate(this.outletMap).map(() => { - this.currentUrlTree = url; - this.currentRouterState = newState; - if (!pop) { - this.location.go(this.urlSerializer.serialize(url)); - } - }); + 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); + }); + 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)); + } }); - r.subscribe((a) => { }, (e) => { }, () => { }); return r; } } +class CanActivate { + constructor(route) { + this.route = route; + } +} +class CanDeactivate { + constructor(component, route) { + this.component = component; + this.route = route; + } +} +class GuardChecks { + constructor(future, curr, injector) { + this.future = future; + this.curr = curr; + this.injector = injector; + this.checks = []; + } + check(parentOutletMap) { + const futureRoot = this.future._root; + const currRoot = this.curr ? this.curr._root : null; + this.traverseChildRoutes(futureRoot, currRoot, parentOutletMap); + if (this.checks.length === 0) + return of(true); + return forkJoin(this.checks.map(s => { + if (s instanceof CanActivate) { + return this.runCanActivate(s.route); + } + else if (s instanceof CanDeactivate) { + return this.runCanDeactivate(s.component, s.route); + } + else { + throw new Error("Cannot be reached"); + } + })).map(and); + } + traverseChildRoutes(futureNode, currNode, outletMap) { + const prevChildren = nodeChildrenAsMap(currNode); + futureNode.children.forEach(c => { + this.traverseRoutes(c, prevChildren[c.value.outlet], outletMap); + delete prevChildren[c.value.outlet]; + }); + forEach(prevChildren, (v, k) => this.deactivateOutletAndItChildren(v, outletMap._outlets[k])); + } + traverseRoutes(futureNode, currNode, parentOutletMap) { + const future = futureNode.value; + const curr = currNode ? currNode.value : null; + const outlet = parentOutletMap ? parentOutletMap._outlets[futureNode.value.outlet] : null; + if (curr && future._routeConfig === curr._routeConfig) { + if (!shallowEqual(future.params, curr.params)) { + this.checks.push(new CanDeactivate(outlet.component, curr), new CanActivate(future)); + } + this.traverseChildRoutes(futureNode, currNode, outlet ? outlet.outletMap : null); + } + else { + this.deactivateOutletAndItChildren(curr, outlet); + this.checks.push(new CanActivate(future)); + this.traverseChildRoutes(futureNode, null, outlet ? outlet.outletMap : null); + } + } + deactivateOutletAndItChildren(route, outlet) { + if (outlet && outlet.isActivated) { + forEach(outlet.outletMap._outlets, (v, k) => this.deactivateOutletAndItChildren(v, outlet.outletMap._outlets[k])); + this.checks.push(new CanDeactivate(outlet.component, route)); + } + } + runCanActivate(future) { + const canActivate = future._routeConfig ? future._routeConfig.canActivate : null; + if (!canActivate || canActivate.length === 0) + return of(true); + return forkJoin(canActivate.map(c => { + const guard = this.injector.get(c); + if (guard.canActivate) { + return of(guard.canActivate(future, this.future)); + } + else { + return of(guard(future, this.future)); + } + })).map(and); + } + runCanDeactivate(component, curr) { + const canDeactivate = curr._routeConfig ? curr._routeConfig.canDeactivate : null; + if (!canDeactivate || canDeactivate.length === 0) + return of(true); + return forkJoin(canDeactivate.map(c => { + const guard = this.injector.get(c); + if (guard.canDeactivate) { + return of(guard.canDeactivate(component, curr, this.curr)); + } + else { + return of(guard(component, curr, this.curr)); + } + })).map(and); + } +} class ActivateRoutes { - constructor(resolver, futureState, currState) { - this.resolver = resolver; + constructor(futureState, currState) { this.futureState = futureState; this.currState = currState; } activate(parentOutletMap) { - const currRoot = this.currState ? rootNode(this.currState) : null; - const futureRoot = rootNode(this.futureState); - return this.activateChildRoutes(futureRoot, currRoot, parentOutletMap); + const futureRoot = this.futureState._root; + const currRoot = this.currState ? this.currState._root : null; + pushQueryParamsAndFragment(this.futureState); + this.activateChildRoutes(futureRoot, currRoot, parentOutletMap); } activateChildRoutes(futureNode, currNode, outletMap) { const prevChildren = nodeChildrenAsMap(currNode); - const observables = []; futureNode.children.forEach(c => { - observables.push(this.activateRoutes(c, prevChildren[c.value.outlet], outletMap).toPromise()); + this.activateRoutes(c, prevChildren[c.value.outlet], outletMap); delete prevChildren[c.value.outlet]; }); forEach(prevChildren, (v, k) => this.deactivateOutletAndItChildren(outletMap._outlets[k])); - return forkJoin(observables); } activateRoutes(futureNode, currNode, parentOutletMap) { const future = futureNode.value; const curr = currNode ? currNode.value : null; const outlet = getOutlet(parentOutletMap, futureNode.value); if (future === curr) { - return this.activateChildRoutes(futureNode, currNode, outlet.outletMap); + advanceActivatedRoute(future); + this.activateChildRoutes(futureNode, currNode, outlet.outletMap); } else { this.deactivateOutletAndItChildren(outlet); const outletMap = new RouterOutletMap(); - return this.activateNewRoutes(outletMap, future, outlet).mergeMap(() => this.activateChildRoutes(futureNode, currNode, outletMap)); + this.activateNewRoutes(outletMap, future, outlet); + this.activateChildRoutes(futureNode, null, outletMap); } } activateNewRoutes(outletMap, future, outlet) { @@ -105,8 +212,8 @@ class ActivateRoutes { { provide: ActivatedRoute, useValue: future }, { provide: RouterOutletMap, useValue: outletMap } ]); - return fromPromise(this.resolver.resolveComponent(future.component)). - map(factory => outlet.activate(factory, resolved, outletMap)); + outlet.activate(future._futureSnapshot._resolvedComponentFactory, resolved, outletMap); + advanceActivatedRoute(future); } deactivateOutletAndItChildren(outlet) { if (outlet && outlet.isActivated) { @@ -115,6 +222,14 @@ class ActivateRoutes { } } } +function pushQueryParamsAndFragment(state) { + if (!shallowEqual(state.snapshot.queryParams, state.queryParams.value)) { + state.queryParams.next(state.snapshot.queryParams); + } + if (state.snapshot.fragment !== state.fragment.value) { + state.fragment.next(state.snapshot.fragment); + } +} function nodeChildrenAsMap(node) { return node ? node.children.reduce((m, c) => { @@ -135,4 +250,4 @@ function getOutlet(outletMap, route) { } return outlet; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FBTyxFQUFxQixrQkFBa0IsRUFBRSxNQUFNLGVBQWU7T0FHOUQsRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUI7T0FDOUMsRUFBRSxTQUFTLEVBQUUsTUFBTSxhQUFhO09BQ2hDLEVBQUUsUUFBUSxFQUFZLE1BQU0sY0FBYztPQUMxQyxFQUFXLGtCQUFrQixFQUFFLE1BQU0sWUFBWTtPQUNqRCxFQUFFLGNBQWMsRUFBVSxNQUFNLFVBQVU7T0FDMUMsRUFBRSxnQkFBZ0IsRUFBZSxjQUFjLEVBQUMsTUFBTSxnQkFBZ0I7T0FHdEUsRUFB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3V0bGV0cywgKHYsIGspID0+IHRoaXMuZGVhY3RpdmF0ZU91dGxldEFuZEl0Q2hpbGRyZW4odikpO1xuICAgICAgb3V0bGV0LmRlYWN0aXZhdGUoKTtcbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gbm9kZUNoaWxkcmVuQXNNYXAobm9kZTogVHJlZU5vZGU8QWN0aXZhdGVkUm91dGU+fG51bGwpIHtcbiAgcmV0dXJuIG5vZGUgP1xuICAgIG5vZGUuY2hpbGRyZW4ucmVkdWNlKFxuICAgICAgKG0sIGMpID0+IHtcbiAgICAgICAgbVtjLnZhbHVlLm91dGxldF0gPSBjO1xuICAgICAgICByZXR1cm4gbTtcbiAgICAgIH0sXG4gICAgICB7fSkgOlxuICB7fTtcbn1cblxuZnVuY3Rpb24gZ2V0T3V0bGV0KG91dGxldE1hcDogUm91dGVyT3V0bGV0TWFwLCByb3V0ZTogQWN0aXZhdGVkUm91dGUpOiBSb3V0ZXJPdXRsZXQge1xuICBsZXQgb3V0bGV0ID0gb3V0bGV0TWFwLl9vdXRsZXRzW3JvdXRlLm91dGxldF07XG4gIGlmICghb3V0bGV0KSB7XG4gICAgaWYgKHJvdXRlLm91dGxldCA9PT0gUFJJTUFSWV9PVVRMRVQpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGZpbmQgcHJpbWFyeSBvdXRsZXRgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBDYW5ub3QgZmluZCB0aGUgb3V0bGV0ICR7cm91dGUub3V0bGV0fWApO1xuICAgIH1cbiAgfVxuICByZXR1cm4gb3V0bGV0O1xufVxuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjo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diff --git a/modules/@angular/router/build/es6/src/router_state.d.ts b/modules/@angular/router/build/es6/src/router_state.d.ts index 569b8837ac..0a2493803c 100644 --- a/modules/@angular/router/build/es6/src/router_state.d.ts +++ b/modules/@angular/router/build/es6/src/router_state.d.ts @@ -1,12 +1,14 @@ import { Tree, TreeNode } from './utils/tree'; import { UrlSegment } from './url_tree'; +import { Route } from './config'; import { Params } from './shared'; import { Observable } from 'rxjs/Observable'; -import { Type } from '@angular/core'; +import { Type, ComponentFactory } from '@angular/core'; export declare class RouterState extends Tree { queryParams: Observable; fragment: Observable; - constructor(root: TreeNode, queryParams: Observable, fragment: Observable); + snapshot: RouterStateSnapshot; + constructor(root: TreeNode, queryParams: Observable, fragment: Observable, snapshot: RouterStateSnapshot); } export declare function createEmptyState(rootComponent: Type): RouterState; export declare class ActivatedRoute { @@ -14,5 +16,23 @@ export declare class ActivatedRoute { params: Observable; outlet: string; component: Type | string; - constructor(urlSegments: Observable, params: Observable, outlet: string, component: Type | string); + _futureSnapshot: ActivatedRouteSnapshot; + snapshot: ActivatedRouteSnapshot; + constructor(urlSegments: Observable, params: Observable, outlet: string, component: Type | string, futureSnapshot: ActivatedRouteSnapshot); } +export declare class ActivatedRouteSnapshot { + urlSegments: UrlSegment[]; + params: Params; + outlet: string; + component: Type | string; + _resolvedComponentFactory: ComponentFactory; + _routeConfig: Route | null; + _lastUrlSegment: UrlSegment; + constructor(urlSegments: UrlSegment[], params: Params, outlet: string, component: Type | string, routeConfig: Route | null, lastUrlSegment: UrlSegment); +} +export declare class RouterStateSnapshot extends Tree { + queryParams: Params; + fragment: string | null; + constructor(root: TreeNode, queryParams: Params, fragment: string | null); +} +export declare function advanceActivatedRoute(route: ActivatedRoute): void; diff --git a/modules/@angular/router/build/es6/src/router_state.js b/modules/@angular/router/build/es6/src/router_state.js index 301c5f6e47..4c8b23b4a8 100644 --- a/modules/@angular/router/build/es6/src/router_state.js +++ b/modules/@angular/router/build/es6/src/router_state.js @@ -1,28 +1,69 @@ import { Tree, TreeNode } from './utils/tree'; +import { shallowEqual } from './utils/collection'; import { UrlSegment } from './url_tree'; import { PRIMARY_OUTLET } from './shared'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; export class RouterState extends Tree { + constructor(root, queryParams, fragment, snapshot) { + super(root); + this.queryParams = queryParams; + this.fragment = fragment; + this.snapshot = snapshot; + } +} +export function createEmptyState(rootComponent) { + const snapshot = createEmptyStateSnapshot(rootComponent); + const emptyUrl = new BehaviorSubject([new UrlSegment("", {}, PRIMARY_OUTLET)]); + const emptyParams = new BehaviorSubject({}); + const emptyQueryParams = new BehaviorSubject({}); + const fragment = new BehaviorSubject(""); + const activated = new ActivatedRoute(emptyUrl, emptyParams, PRIMARY_OUTLET, rootComponent, snapshot.root); + activated.snapshot = snapshot.root; + return new RouterState(new TreeNode(activated, []), emptyQueryParams, fragment, snapshot); +} +function createEmptyStateSnapshot(rootComponent) { + const rootUrlSegment = new UrlSegment("", {}, PRIMARY_OUTLET); + const emptyUrl = [rootUrlSegment]; + const emptyParams = {}; + const emptyQueryParams = {}; + const fragment = ""; + const activated = new ActivatedRouteSnapshot(emptyUrl, emptyParams, PRIMARY_OUTLET, rootComponent, null, rootUrlSegment); + return new RouterStateSnapshot(new TreeNode(activated, []), emptyQueryParams, fragment); +} +export class ActivatedRoute { + constructor(urlSegments, params, outlet, component, futureSnapshot) { + this.urlSegments = urlSegments; + this.params = params; + this.outlet = outlet; + this.component = component; + this._futureSnapshot = futureSnapshot; + } +} +export class ActivatedRouteSnapshot { + constructor(urlSegments, params, outlet, component, routeConfig, lastUrlSegment) { + this.urlSegments = urlSegments; + this.params = params; + this.outlet = outlet; + this.component = component; + this._routeConfig = routeConfig; + this._lastUrlSegment = lastUrlSegment; + } +} +export class RouterStateSnapshot extends Tree { constructor(root, queryParams, fragment) { super(root); this.queryParams = queryParams; this.fragment = fragment; } } -export function createEmptyState(rootComponent) { - const emptyUrl = new BehaviorSubject([new UrlSegment("", {}, PRIMARY_OUTLET)]); - const emptyParams = new BehaviorSubject({}); - const emptyQueryParams = new BehaviorSubject({}); - const fragment = new BehaviorSubject(""); - const activated = new ActivatedRoute(emptyUrl, emptyParams, PRIMARY_OUTLET, rootComponent); - return new RouterState(new TreeNode(activated, []), emptyQueryParams, fragment); -} -export class ActivatedRoute { - constructor(urlSegments, params, outlet, component) { - this.urlSegments = urlSegments; - this.params = params; - this.outlet = outlet; - this.component = component; +export function advanceActivatedRoute(route) { + if (route.snapshot && !shallowEqual(route.snapshot.params, route._futureSnapshot.params)) { + route.snapshot = route._futureSnapshot; + route.urlSegments.next(route.snapshot.urlSegments); + route.params.next(route.snapshot.params); + } + else { + route.snapshot = route._futureSnapshot; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX3N0YXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JvdXRlcl9zdGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiT0FBTyxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjO09BQ3RDLEVBQUUsVUFBVSxFQUFFLE1BQU0sWUFBWTtPQUNoQyxFQUFVLGNBQWMsRUFBRSxNQUFNLFVBQVU7T0FFMUMsRUFBRSxlQUFlLEVBQUUsTUFBTSxzQkFBc0I7QUFrQnRELGlDQUFpQyxJQUFJO0lBQ25DLFlBQVksSUFBOEIsRUFBUyxXQUErQixFQUFTLFFBQTRCO1FBQ3JILE1BQU0sSUFBSSxDQUFDLENBQUM7UUFEcUMsZ0JBQVcsR0FBWCxXQUFXLENBQW9CO1FBQVMsYUFBUSxHQUFSLFFBQVEsQ0FBb0I7SUFFdkgsQ0FBQztBQUNILENBQUM7QUFFRCxpQ0FBaUMsYUFBbUI7SUFDbEQsTUFBTSxRQUFRLEdBQUcsSUFBSSxlQUFlLENBQUMsQ0FBQyxJQUFJLFVBQVUsQ0FBQyxFQUFFLEV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LFxuICAgICAgICAgICAgICBwdWJsaWMgY29tcG9uZW50OiBUeXBlIHwgc3RyaW5nLFxuICAgICAgICAgICAgICBmdXR1cmVTbmFwc2hvdDogQWN0aXZhdGVkUm91dGVTbmFwc2hvdFxuICApIHtcbiAgICB0aGlzLl9mdXR1cmVTbmFwc2hvdCA9IGZ1dHVyZVNuYXBzaG90O1xuICB9XG59XG5cbi8qKlxuICogQ29udGFpbnMgdGhlIGluZm9ybWF0aW9uIGFib3V0IGEgY29tcG9uZW50IGxvYWRlZCBpbiBhbiBvdXRsZXQgYXQgYSBwYXJ0aWN1bGFyIG1vbWVudCBpbiB0aW1lLlxuICpcbiAqICMjIyBVc2FnZVxuICpcbiAqIGBgYFxuICogY2xhc3MgTXlDb21wb25lbnQge1xuICogICBjb25zdHJ1Y3Rvcihyb3V0ZTogQWN0aXZhdGVkUm91dGUpIHtcbiAqICAgICBjb25zdCBpZDogc3RyaW5nID0gcm91dGUuc25hcHNob3QucGFyYW1zLmlkO1xuICogICB9XG4gKiB9XG4gKiBgYGBcbiAqL1xuZXhwb3J0IGNsYXNzIEFjdGl2YXRlZFJvdXRlU25hcHNob3Qge1xuICAvKipcbiAgICogQGludGVybmFsXG4gICAqL1xuICBfcmVzb2x2ZWRDb21wb25lbnRGYWN0b3J5OiBDb21wb25lbnRGYWN0b3J5PGFueT47XG4gIFxuICAvKiogQGludGVybmFsICoqL1xuICBfcm91dGVDb25maWc6IFJvdXRlIHwgbnVsbDtcblxuICAvKiogQGludGVybmFsICoqL1xuICBfbGFzdFVybFNlZ21lbnQ6IFVybFNlZ21lbnQ7XG5cbiAgLyoqXG4gICAqIEBpbnRlcm5hbFxuICAgKi9cbiAgY29uc3RydWN0b3IocHVibGljIHVybFNlZ21lbnRzOiBVcmxTZWdtZW50W10sXG4gICAgICAgICAgICAgIHB1YmxpYyBwYXJhbXM6IFBhcmFtcyxcbiAgICAgICAgICAgICAgcHVibGljIG91dGxldDogc3RyaW5nLFxuICAgICAgICAgICAgICB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G5ldyB2YWx1ZXMgaW50byB0aGUgb2JzZXJ2YWJsZXMgb25seSB3aGVuIHRoZXkgYXJlIG5vdCB0aGUgaW5pdGlhbCB2YWx1ZXMuXG4gKiBBbmQgd2UgZGV0ZWN0IHRoYXQgYnkgY2hlY2tpbmcgaWYgdGhlIHNuYXBzaG90IGZpZWxkIGlzIHNldC5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGFkdmFuY2VBY3RpdmF0ZWRSb3V0ZShyb3V0ZTogQWN0aXZhdGVkUm91dGUpOiB2b2lkIHtcbiAgaWYgKHJvdXRlLnNuYXBzaG90ICYmICFzaGFsbG93RXF1YWwocm91dGUuc25hcHNob3QucGFyYW1zLCByb3V0ZS5fZnV0dXJlU25hcHNob3QucGFyYW1zKSkge1xuICAgIHJvdXRlLnNuYXBzaG90ID0gcm91dGUuX2Z1dHVyZVNuYXBzaG90O1xuICAgICg8YW55PnJvdXRlLnVybFNlZ21lbnRzKS5uZXh0KHJvdXRlLnNuYXBzaG90LnVybFNlZ21lbnRzKTtcbiAgICAoPGFueT5yb3V0ZS5wYXJhbXMpLm5leHQocm91dGUuc25hcHNob3QucGFyYW1zKTtcbiAgfSBlbHNlIHtcbiAgICByb3V0ZS5zbmFwc2hvdCA9IHJvdXRlLl9mdXR1cmVTbmFwc2hvdDtcbiAgfVxufSJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/url_serializer.js b/modules/@angular/router/build/es6/src/url_serializer.js index 3ee0925dbf..6a0ec4c9b7 100644 --- a/modules/@angular/router/build/es6/src/url_serializer.js +++ b/modules/@angular/router/build/es6/src/url_serializer.js @@ -1,6 +1,6 @@ import { UrlTree, UrlSegment } from './url_tree'; import { PRIMARY_OUTLET } from './shared'; -import { rootNode, TreeNode } from './utils/tree'; +import { TreeNode } from './utils/tree'; export class UrlSerializer { } export class DefaultUrlSerializer { @@ -9,7 +9,7 @@ export class DefaultUrlSerializer { return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment()); } serialize(tree) { - const node = serializeUrlTreeNode(rootNode(tree)); + const node = serializeUrlTreeNode(tree._root); const query = serializeQueryParams(tree.queryParameters); const fragment = tree.fragment !== null ? `#${tree.fragment}` : ''; return `${node}${query}${fragment}`; @@ -209,4 +209,4 @@ class UrlParser { return segments; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3NlcmlhbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXJsX3NlcmlhbGl6ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik9BQU8sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sWUFBWTtPQUN6QyxFQUFFLGNBQWMsRUFBRSxNQUFNLFVBQVU7T0FDbEMsRUFBRSxRQUFRLEVBQUUsUUFBUSxFQUFFLE1BQU0sY0FBYztBQUtqRDtBQVVBLENBQUM7QUFLRDtJQUNFLEtBQUssQ0FBQyxHQUFXO1FBQ2YsTUFBTSxDQUFDLEdBQUcsSUFBSSxTQUFTLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDN0IsTUFBTSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxnQkFBZ0IsRUFBRSxFQUFFLENBQUMsQ0FBQyxnQkFBZ0IsRUFBRSxFQUFFLENBQUMsQ0FBQyxhQUFhLEVBQUUsQ0FBQyxDQUFDO0lBQ3BGLENBQUM7SUFFRCxTQUFTLENBQUMsSUFBYTtRQUNyQixNQUFNLElBQUksR0FBRyxvQkFBb0IsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUNsRCxNQUFNLEtBQUssR0FBRyxvQkFBb0IsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLENBQUM7UUFDekQsTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLFFBQVEsS0FBSyxJQUFJLEdBQUcsSU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xTZWdtZW50PltdIHtcbiAgICB2YXIgc2VnbWVudHMgPSBbXTtcbiAgICB0aGlzLmNhcHR1cmUoJygnKTtcblxuICAgIHdoaWxlICghdGhpcy5wZWVrU3RhcnRzV2l0aCgnKScpICYmIHRoaXMucmVtYWluaW5nLmxlbmd0aCA+IDApIHtcbiAgICAgIHNlZ21lbnRzID0gc2VnbWVudHMuY29uY2F0KHRoaXMucGFyc2VTZWdtZW50cyh0cnVlKSk7XG4gICAgICBpZiAodGhpcy5wZWVrU3RhcnRzV2l0aCgnLy8nKSkge1xuICAgICAgICB0aGlzLmNhcHR1cmUoJy8vJyk7XG4gICAgICB9XG4gICAgfVxuICAgIHRoaXMuY2FwdHVyZSgnKScpO1xuXG4gICAgcmV0dXJuIHNlZ21lbnRzO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/url_tree.js b/modules/@angular/router/build/es6/src/url_tree.js index 272b03bf73..197485284e 100644 --- a/modules/@angular/router/build/es6/src/url_tree.js +++ b/modules/@angular/router/build/es6/src/url_tree.js @@ -40,4 +40,4 @@ export function equalUrlSegments(a, b) { } return true; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXJsX3RyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik9BQU8sRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLE1BQU0sY0FBYztPQUN0QyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQjtPQUMxQyxFQUFFLGNBQWMsRUFBRSxNQUFNLFVBQVU7QUFFekM7SUFDRSxNQUFNLENBQUMsSUFBSSxPQUFPLENBQUMsSUFBSSxRQUFRLENBQWEsSUFBSSxVQUFVLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxjQUFjLENBQUMsRUFBRSxFQUFFLENBQU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wYXJhbXNTdHJpbmcgPSBwYXJhbXMubGVuZ3RoID4gMCA/IGAoJHtwYXJhbXMuam9pbignLCcpfSlgIDogJyc7XG4gICAgY29uc3Qgb3V0bGV0ID0gdGhpcy5vdXRsZXQgPT09IFBSSU1BUllfT1VUTEVUID8gJycgOiBgJHt0aGlzLm91dGxldH06YDtcbiAgICByZXR1cm4gYCR7b3V0bGV0fSR7dGhpcy5wYXRofSR7cGFyYW1zU3RyaW5nfWA7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGVxdWFsVXJsU2VnbWVudHMoYTogVXJsU2VnbWVudFtdLCBiOiBVcmxTZWdtZW50W10pOiBib29sZWFuIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkgcmV0dXJuIGZhbHNlO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGEubGVuZ3RoOyArK2kpIHtcbiAgICBpZiAoYVtpXS5wYXRoICE9PSBiW2ldLnBhdGgpIHJldHVybiBmYWxzZTtcbiAgICBpZiAoIXNoYWxsb3dFcXVhbChhW2ldLnBhcmFtZXRlcnMsIGJbaV0ucGFyYW1ldGVycykpIHJldHVybiBmYWxzZTtcbiAgfVxuICByZXR1cm4gdHJ1ZTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/utils/collection.d.ts b/modules/@angular/router/build/es6/src/utils/collection.d.ts index 9df4eefaf9..8b0d7d8a67 100644 --- a/modules/@angular/router/build/es6/src/utils/collection.d.ts +++ b/modules/@angular/router/build/es6/src/utils/collection.d.ts @@ -5,6 +5,7 @@ export declare function shallowEqual(a: { }): boolean; export declare function flatten(a: T[][]): T[]; export declare function first(a: T[]): T | null; +export declare function and(bools: boolean[]): boolean; export declare function merge(m1: { [key: string]: V; }, m2: { diff --git a/modules/@angular/router/build/es6/src/utils/collection.js b/modules/@angular/router/build/es6/src/utils/collection.js index 92be32b5cf..f3ed6e7aec 100644 --- a/modules/@angular/router/build/es6/src/utils/collection.js +++ b/modules/@angular/router/build/es6/src/utils/collection.js @@ -25,6 +25,9 @@ export function flatten(a) { export function first(a) { return a.length > 0 ? a[0] : null; } +export function and(bools) { + return bools.reduce((a, b) => a && b, true); +} export function merge(m1, m2) { var m = {}; for (var attr in m1) { @@ -46,4 +49,4 @@ export function forEach(map, callback) { } } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy91dGlscy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDZCQUE2QixDQUFtQixFQUFFLENBQW1CO0lBQ25FLElBQUksRUFBRSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDeEIsSUFBSSxFQUFFLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN4QixFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsTUFBTSxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1FBQzNCLE1BQU0sQ0FBQyxLQUFLLENBQUM7SUFDZixDQUFDO0lBQ0QsSUFBSSxHQUFHLENBQUM7SUFDUixHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQztRQUNuQyxHQUFHLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ1osRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDdEIsTUFBTSxDQUFDLEtBQUssQ0FBQzt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5cbiAgZm9yICh2YXIgYXR0ciBpbiBtMikge1xuICAgIGlmIChtMi5oYXNPd25Qcm9wZXJ0eShhdHRyKSkge1xuICAgICAgbVthdHRyXSA9IG0yW2F0dHJdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZm9yRWFjaDxLLCBWPihtYXA6IHtba2V5OiBzdHJpbmddOiBWfSwgY2FsbGJhY2s6IC8qKFYsIEspID0+IHZvaWQqLyBGdW5jdGlvbik6IHZvaWQge1xuICBmb3IgKHZhciBwcm9wIGluIG1hcCkge1xuICAgIGlmIChtYXAuaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgIGNhbGxiYWNrKG1hcFtwcm9wXSwgcHJvcCk7XG4gICAgfVxuICB9XG59Il19 \ No newline at end of file diff --git a/modules/@angular/router/build/es6/src/utils/tree.d.ts b/modules/@angular/router/build/es6/src/utils/tree.d.ts index 1b025de959..1b28a53874 100644 --- a/modules/@angular/router/build/es6/src/utils/tree.d.ts +++ b/modules/@angular/router/build/es6/src/utils/tree.d.ts @@ -9,7 +9,6 @@ export declare class Tree { pathFromRoot(t: T): T[]; contains(tree: Tree): boolean; } -export declare function rootNode(tree: Tree): TreeNode; export declare class TreeNode { value: T; children: TreeNode[]; diff --git a/modules/@angular/router/build/es6/src/utils/tree.js b/modules/@angular/router/build/es6/src/utils/tree.js index b0a517094a..20926871fa 100644 --- a/modules/@angular/router/build/es6/src/utils/tree.js +++ b/modules/@angular/router/build/es6/src/utils/tree.js @@ -25,9 +25,6 @@ export class Tree { pathFromRoot(t) { return findPath(t, this._root, []).map(s => s.value); } contains(tree) { return contains(this._root, tree._root); } } -export function rootNode(tree) { - return tree._root; -} function findNode(expected, c) { if (expected === c.value) return c; @@ -68,4 +65,4 @@ export class TreeNode { this.children = children; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS5qcyIsInNvdXJjZVJvb3Q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5vZGU8VD4pOiBib29sZWFuIHtcbiAgaWYgKHRyZWUudmFsdWUgIT09IHN1YnRyZWUudmFsdWUpIHJldHVybiBmYWxzZTtcblxuICBmb3IgKGxldCBzdWJ0cmVlTm9kZSBvZiBzdWJ0cmVlLmNoaWxkcmVuKSB7XG4gICAgY29uc3QgcyA9IHRyZWUuY2hpbGRyZW4uZmlsdGVyKGNoaWxkID0+IGNoaWxkLnZhbHVlID09PSBzdWJ0cmVlTm9kZS52YWx1ZSk7XG4gICAgaWYgKHMubGVuZ3RoID09PSAwKSByZXR1cm4gZmFsc2U7XG4gICAgaWYgKCFjb250YWlucyhzWzBdLCBzdWJ0cmVlTm9kZSkpIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG5leHBvcnQgY2xhc3MgVHJlZU5vZGU8VD4ge1xuICBjb25zdHJ1Y3RvcihwdWJsaWMgdmFsdWU6IFQsIHB1YmxpYyBjaGlsZHJlbjogVHJlZU5vZGU8VD5bXSkge31cbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/common_router_providers.js b/modules/@angular/router/build/src/common_router_providers.js index acdbd35f99..7f29cf6abb 100644 --- a/modules/@angular/router/build/src/common_router_providers.js +++ b/modules/@angular/router/build/src/common_router_providers.js @@ -12,21 +12,21 @@ function provideRouter(config) { { provide: url_serializer_1.UrlSerializer, useClass: url_serializer_1.DefaultUrlSerializer }, { provide: router_1.Router, - useFactory: function (ref, resolver, urlSerializer, outletMap, location) { + useFactory: function (ref, resolver, urlSerializer, outletMap, location, injector) { if (ref.componentTypes.length == 0) { throw new Error("Bootstrap at least one component before injecting Router."); } var componentType = ref.componentTypes[0]; - var r = new router_1.Router(componentType, resolver, urlSerializer, outletMap, location); + var r = new router_1.Router(componentType, resolver, urlSerializer, outletMap, location, injector); r.resetConfig(config); ref.registerDisposeListener(function () { return r.dispose(); }); return r; }, - deps: [core_1.ApplicationRef, core_1.ComponentResolver, url_serializer_1.UrlSerializer, router_outlet_map_1.RouterOutletMap, common_1.Location] + deps: [core_1.ApplicationRef, core_1.ComponentResolver, url_serializer_1.UrlSerializer, router_outlet_map_1.RouterOutletMap, common_1.Location, core_1.Injector] }, router_outlet_map_1.RouterOutletMap, { provide: router_state_1.ActivatedRoute, useFactory: function (r) { return r.routerState.root; }, deps: [router_1.Router] }, ]; } exports.provideRouter = provideRouter; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3JvdXRlcl9wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uX3JvdXRlcl9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGtDQUFnQyxxQkFBcUIsQ0FBQyxDQUFBO0FBQ3RELCtCQUFvRCxrQkFBa0IsQ0FBQyxDQUFBO0FBQ3ZFLDZCQUErQixnQkFBZ0IsQ0FBQyxDQUFBO0FBQ2hELHVCQUF1QixVQUFVLENBQUMsQ0FBQTtBQUVsQyxxQkFBaUQsZUFBZSxDQUFDLENBQUE7QUFDakUsdUJBQWlFLGlCQUFpQixDQUFDLENBQUE7QUFvQm5GLHVCQUE4QixNQUFvQjtJQUNoRCxNQUFNLENBQUM7UUFDTCxpQkFBUTtRQUNSLEVBQUMsT0FBTyxFQUFFLHlCQUFnQixFQUFFLFFBQVEsRUFBRSw2QkFBb0IsRUFBQztRQUMzRCxFQUFDLE9BQU8sRUFBRSw4QkFBYSxFQUFFLFFBQVEsRUFBRSxxQ0FBb0IsRUFBQztRQUV4RDtZQUNFLE9BQU8sRUFBRSxlQUFNO1lBQ2YsVUFBVSxFQUFFLFVBQUMsR0FBRyxFQUFFLFFBQVEsRUFBRSxhQUFhLEVBQUUsU0FBUyxFQUFFLFFBQVE7Z0JBQzVELEVBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsTUFBTSxJQUFJLENBQ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ZWYsIHJlc29sdmVyLCB1cmxTZXJpYWxpemVyLCBvdXRsZXRNYXAsIGxvY2F0aW9uLCBpbmplY3RvcikgPT4ge1xuICAgICAgICBpZiAocmVmLmNvbXBvbmVudFR5cGVzLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiQm9vdHN0cmFwIGF0IGxlYXN0IG9uZSBjb21wb25lbnQgYmVmb3JlIGluamVjdGluZyBSb3V0ZXIuXCIpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudFR5cGUgPSByZWYuY29tcG9uZW50VHlwZXNbMF07XG4gICAgICAgIGNvbnN0IHIgPSBuZXcgUm91dGVyKGNvbXBvbmVudFR5cGUsIHJlc29sdmVyLCB1cmxTZXJpYWxpemVyLCBvdXRsZXRNYXAsIGxvY2F0aW9uLCBpbmplY3Rvcik7XG4gICAgICAgIHIucmVzZXRDb25maWcoY29uZmlnKTtcbiAgICAgICAgcmVmLnJlZ2lzdGVyRGlzcG9zZUxpc3RlbmVyKCgpID0+IHIuZGlzcG9zZSgpKTtcbiAgICAgICAgcmV0dXJuIHI7XG4gICAgICB9LFxuICAgICAgZGVwczogW0FwcGxpY2F0aW9uUmVmLCBDb21wb25lbnRSZXNvbHZlciwgVXJsU2VyaWFsaXplciwgUm91dGVyT3V0bGV0TWFwLCBMb2NhdGlvbiwgSW5qZWN0b3JdXG4gICAgfSxcblxuICAgIFJvdXRlck91dGxldE1hcCxcbiAgICB7cHJvdmlkZTogQWN0aXZhdGVkUm91dGUsIHVzZUZhY3Rvcnk6IChyKSA9PiByLnJvdXRlclN0YXRlLnJvb3QsIGRlcHM6IFtSb3V0ZXJdfSxcbiAgXTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/src/config.d.ts b/modules/@angular/router/build/src/config.d.ts index d0f5b418d6..2074d71163 100644 --- a/modules/@angular/router/build/src/config.d.ts +++ b/modules/@angular/router/build/src/config.d.ts @@ -5,5 +5,7 @@ export interface Route { path?: string; component: Type | string; outlet?: string; + canActivate?: any[]; + canDeactivate?: any[]; children?: Route[]; } diff --git a/modules/@angular/router/build/src/config.js b/modules/@angular/router/build/src/config.js index c50ab67c1f..b6bbebb9a9 100644 --- a/modules/@angular/router/build/src/config.js +++ b/modules/@angular/router/build/src/config.js @@ -1,2 +1,2 @@ "use strict"; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2hpbGRyZW4/OiBSb3V0ZVtdO1xufSJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2FuQWN0aXZhdGU/OiBhbnlbXSxcbiAgY2FuRGVhY3RpdmF0ZT86IGFueVtdLFxuICBjaGlsZHJlbj86IFJvdXRlW107XG59Il19 \ No newline at end of file diff --git a/modules/@angular/router/build/src/create_router_state.d.ts b/modules/@angular/router/build/src/create_router_state.d.ts new file mode 100644 index 0000000000..4ff54a3c73 --- /dev/null +++ b/modules/@angular/router/build/src/create_router_state.d.ts @@ -0,0 +1,2 @@ +import { RouterStateSnapshot, RouterState } from './router_state'; +export declare function createRouterState(curr: RouterStateSnapshot, prevState: RouterState): RouterState; diff --git a/modules/@angular/router/build/src/create_router_state.js b/modules/@angular/router/build/src/create_router_state.js new file mode 100644 index 0000000000..a78bf13a11 --- /dev/null +++ b/modules/@angular/router/build/src/create_router_state.js @@ -0,0 +1,42 @@ +"use strict"; +var router_state_1 = require('./router_state'); +var tree_1 = require('./utils/tree'); +var BehaviorSubject_1 = require('rxjs/BehaviorSubject'); +function createRouterState(curr, prevState) { + var root = createNode(curr._root, prevState ? prevState._root : undefined); + var queryParams = prevState ? prevState.queryParams : new BehaviorSubject_1.BehaviorSubject(curr.queryParams); + var fragment = prevState ? prevState.fragment : new BehaviorSubject_1.BehaviorSubject(curr.fragment); + return new router_state_1.RouterState(root, queryParams, fragment, curr); +} +exports.createRouterState = createRouterState; +function createNode(curr, prevState) { + if (prevState && equalRouteSnapshots(prevState.value.snapshot, curr.value)) { + var value = prevState.value; + value._futureSnapshot = curr.value; + var children = createOrReuseChildren(curr, prevState); + return new tree_1.TreeNode(value, children); + } + else { + var value = createActivatedRoute(curr.value); + var children = curr.children.map(function (c) { return createNode(c); }); + return new tree_1.TreeNode(value, children); + } +} +function createOrReuseChildren(curr, prevState) { + return curr.children.map(function (child) { + var index = prevState.children.findIndex(function (p) { return equalRouteSnapshots(p.value.snapshot, child.value); }); + if (index >= 0) { + return createNode(child, prevState.children[index]); + } + else { + return createNode(child); + } + }); +} +function createActivatedRoute(c) { + return new router_state_1.ActivatedRoute(new BehaviorSubject_1.BehaviorSubject(c.urlSegments), new BehaviorSubject_1.BehaviorSubject(c.params), c.outlet, c.component, c); +} +function equalRouteSnapshots(a, b) { + return a._routeConfig === b._routeConfig; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX3JvdXRlcl9zdGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGVfcm91dGVyX3N0YXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw2QkFBeUYsZ0JBQWdCLENBQUMsQ0FBQTtBQUMxRyxxQkFBeUIsY0FBYyxDQUFDLENBQUE7QUFDeEMsZ0NBQWdDLHNCQUFzQixDQUFDLENBQUE7QUFFdkQsMkJBQWtDLElBQXlCLEVBQUUsU0FBc0I7SUFDakYsSUFBTSxJQUFJLEdBQUcsVUFBVSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsU0FBUyxHQUFHLFNBQVMsQ0FBQyxLQUFLLEdBQUcsU0FBUyxDQUFDLENBQUM7SUFDN0UsSUFBTSxXQUFXLEdBQUcsU0FBUyxHQUFHLFNBQVMsQ0FBQyxXQUFXLEdBQUcsSUFBSSxpQ0FBZSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUM5RixJQUFNLFFBQVEsR0FBRyxTQUFTLEdBQUcsU0FBUyxDQUFDLFFBQVEsR0FBRyxJQUFJLGlDQUFlLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ3JGLE1BQU0sQ0FBQyxJQUFJLDBCQUFXLENBQUMsSUFBSSxFQUFFLFdBQVcsRUFBRSxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDNUQsQ0FBQztBQUxlLHlCQU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5ldyBCZWhhdmlvclN1YmplY3QoYy51cmxTZWdtZW50cyksIG5ldyBCZWhhdmlvclN1YmplY3QoYy5wYXJhbXMpLCBjLm91dGxldCwgYy5jb21wb25lbnQsIGMpO1xufVxuXG5mdW5jdGlvbiBlcXVhbFJvdXRlU25hcHNob3RzKGE6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsIGI6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QpOiBib29sZWFuIHtcbiAgcmV0dXJuIGEuX3JvdXRlQ29uZmlnID09PSBiLl9yb3V0ZUNvbmZpZztcbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/create_url_tree.js b/modules/@angular/router/build/src/create_url_tree.js index 0053e97510..018ee86192 100644 --- a/modules/@angular/router/build/src/create_url_tree.js +++ b/modules/@angular/router/build/src/create_url_tree.js @@ -5,7 +5,7 @@ var collection_1 = require('./utils/collection'); var shared_1 = require('./shared'); function createUrlTree(route, urlTree, commands, queryParameters, fragment) { if (commands.length === 0) { - return tree(tree_1.rootNode(urlTree), urlTree, queryParameters, fragment); + return tree(urlTree._root, urlTree, queryParameters, fragment); } var normalizedCommands = normalizeCommands(commands); if (navigateToRoot(normalizedCommands)) { @@ -15,7 +15,7 @@ function createUrlTree(route, urlTree, commands, queryParameters, fragment) { var updated = normalizedCommands.commands.length > 0 ? updateMany(startingNode.children.slice(0), normalizedCommands.commands) : []; - var newRoot = constructNewTree(tree_1.rootNode(urlTree), startingNode, updated); + var newRoot = constructNewTree(urlTree._root, startingNode, updated); return tree(newRoot, urlTree, queryParameters, fragment); } exports.createUrlTree = createUrlTree; @@ -76,16 +76,15 @@ function normalizeCommands(commands) { } function findStartingNode(normalizedChange, urlTree, route) { if (normalizedChange.isAbsolute) { - return tree_1.rootNode(urlTree); + return urlTree._root; } else { var urlSegment = findUrlSegment(route, urlTree, normalizedChange.numberOfDoubleDots); - return findMatchingNode(urlSegment, tree_1.rootNode(urlTree)); + return findMatchingNode(urlSegment, urlTree._root); } } function findUrlSegment(route, urlTree, numberOfDoubleDots) { - var segments = route.urlSegments.value; - var urlSegment = segments[segments.length - 1]; + var urlSegment = route.snapshot._lastUrlSegment; var path = urlTree.pathFromRoot(urlSegment); if (path.length <= numberOfDoubleDots) { throw new Error("Invalid number of '../'"); @@ -186,4 +185,4 @@ function recurse(urlSegment, node, rest) { var children = node ? node.children.slice(0) : []; return new tree_1.TreeNode(urlSegment, updateMany(children, rest)); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX3VybF90cmVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyZWF0ZV91cmxfdHJlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEseUJBQXNELFlBQVksQ0FBQyxDQUFBO0FBQ25FLHFCQUFtQyxjQUFjLENBQUMsQ0FBQTtBQUNsRCwyQkFBc0Msb0JBQW9CLENBQUMsQ0FBQTtBQUUzRCx1QkFBdUMsVUFBVSxDQUFDLENBQUE7QUFFbEQsdUJBQThCLEtBQXFCLEVBQUUsT0FBZ0IsRUFBRSxRQUFlLEVBQ3hELGVBQW1DLEVBQUUsUUFBNEI7SUFDN0YsRUFBRSxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzFCLE1BQU0sQ0FBQyxJQUFJLENBQUMsZUFBUSxDQUFDLE9BQU8sQ0FBQyxFQUFFLE9BQU8sRUFBRSxlQUFlLEVBQUUsUUFBUSxDQUFDLENBQUM7SUFDckUsQ0FBQztJQUVELElBQU0sa0JBQWtCLEdBQUcsaUJBQWlCLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDdkQsRUFBRSxDQUFDLENBQUMsY0FBYyxDQUFDLGtCQUFrQixDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBS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bWJlck9mRG91YmxlRG90cyA9IDA7XG4gIGxldCBpc0Fic29sdXRlID0gZmFsc2U7XG4gIGNvbnN0IHJlcyA9IFtdO1xuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgY29tbWFuZHMubGVuZ3RoOyArK2kpIHtcbiAgICBjb25zdCBjID0gY29tbWFuZHNbaV07XG5cbiAgICBpZiAoISh0eXBlb2YgYyA9PT0gXCJzdHJpbmdcIikpIHtcbiAgICAgIHJlcy5wdXNoKGMpO1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgY29uc3QgcGFydHMgPSBjLnNwbGl0KCcvJyk7XG4gICAgZm9yIChsZXQgaiA9IDA7IGogPCBwYXJ0cy5sZW5ndGg7ICsraikge1xuICAgICAgbGV0IGNjID0gcGFydHNbal07XG5cbiAgICAgIC8vIGZpcnN0IGV4cCBpcyB0cmVhdGVkIGluIGEgc3BlY2lhbCB3YXlcbiAgICAgIGlmIChpID09IDApIHtcbiAgICAgICAgaWYgKGogPT0gMCAmJiBjYyA9PSBcIi5cIikgeyAgLy8gICcuL2EnXG4gICAgICAgICAgLy8gc2tpcCBpdFxuICAgICAgICB9IGVsc2UgaWYgKGogPT0gMCAmJiBjYyA9PSBcIlwiKSB7ICAvLyAgJy9hJ1xuICAgICAgICAgIGlzQWJzb2x1dGUgPSB0cnVlO1xuICAgICAgICB9IGVsc2UgaWYgKGNjID09IFwiLi5cIikgeyAgLy8gICcuLi9hJ1xuICAgICAgICAgIG51bWJlck9mRG91YmxlRG90cysrO1xuICAgICAgICB9IGVsc2UgaWYgKGNjICE9ICcnKSB7XG4gICAgICAgICAgcmVzLnB1c2goY2MpO1xuICAgICAgICB9XG5cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChjYyAhPSAnJykge1xuICAgICAgICAgIHJlcy5wdXNoKGNjKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBuZXcgTm9ybWFsaXplZE5hdmlnYXR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CBbXSk7XG4gIH1cbiAgY29uc3QgY2hpbGRyZW4gPSBub2RlID8gbm9kZS5jaGlsZHJlbi5zbGljZSgwKSA6IFtdO1xuICByZXR1cm4gbmV3IFRyZWVOb2RlPFVybFNlZ21lbnQ+KHVybFNlZ21lbnQsIHVwZGF0ZU1hbnkoY2hpbGRyZW4sIHJlc3QpKTtcbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/directives/router_link.js b/modules/@angular/router/build/src/directives/router_link.js index 11f7f909e3..663942d01f 100644 --- a/modules/@angular/router/build/src/directives/router_link.js +++ b/modules/@angular/router/build/src/directives/router_link.js @@ -69,4 +69,4 @@ var RouterLink = (function () { return RouterLink; }()); exports.RouterLink = RouterLink; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2xpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZGlyZWN0aXZlcy9yb3V0ZXJfbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEscUJBS08sZUFBZSxDQUFDLENBQUE7QUFDdkIsdUJBQXFCLFdBQVcsQ0FBQyxDQUFBO0FBQ2pDLDZCQUE2QixpQkFBaUIsQ0FBQyxDQUFBO0FBNEIvQztJQU9FLG9CQUFvQixNQUFjLEVBQVUsS0FBcUI7UUFBN0MsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUFVLFVBQUssR0FBTCxLQUFLLENBQWdCO1FBTHpELGFBQVEsR0FBVSxFQUFFLENBQUM7SUFLdUMsQ0FBQztJQUdyRSxzQkFBSSxrQ0FBVTthQUFkLFVBQWUsSUFBb0I7WUFDakMsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3hCLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFD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mVyKFwiY2xpY2tcIilcbiAgb25DbGljaygpOiBib29sZWFuIHtcbiAgICAvLyBJZiBubyB0YXJnZXQsIG9yIGlmIHRhcmdldCBpcyBfc2VsZiwgcHJldmVudCBkZWZhdWx0IGJyb3dzZXIgYmVoYXZpb3JcbiAgICBpZiAoISh0eXBlb2YgdGhpcy50YXJnZXQgPT09IFwic3RyaW5nXCIpIHx8IHRoaXMudGFyZ2V0ID09ICdfc2VsZicpIHtcbiAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlKHRoaXMuY29tbWFuZHMsIHtyZWxhdGl2ZVRvOiB0aGlzLnJvdXRlfSk7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG5cbiAgcHJpdmF0ZSB1cGRhdGVUYXJnZXRVcmxBbmRIcmVmKCk6IHZvaWQge1xuICAgIGNvbnN0IHRyZWUgPSB0aGlzLnJvdXRlci5jcmVhdGVVcmxUcmVlKHRoaXMuY29tbWFuZHMsIHtyZWxhdGl2ZVRvOiB0aGlzLnJvdXRlfSk7XG4gICAgaWYgKHRyZWUpIHtcbiAgICAgIHRoaXMuaHJlZiA9IHRoaXMucm91dGVyLnNlcmlhbGl6ZVVybCh0cmVlKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/src/directives/router_outlet.d.ts b/modules/@angular/router/build/src/directives/router_outlet.d.ts index bfddeddb4b..d67ccb3f79 100644 --- a/modules/@angular/router/build/src/directives/router_outlet.d.ts +++ b/modules/@angular/router/build/src/directives/router_outlet.d.ts @@ -6,6 +6,7 @@ export declare class RouterOutlet { outletMap: RouterOutletMap; constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, name: string); readonly isActivated: boolean; + readonly component: Object; deactivate(): void; activate(factory: ComponentFactory, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void; } diff --git a/modules/@angular/router/build/src/directives/router_outlet.js b/modules/@angular/router/build/src/directives/router_outlet.js index 41ac2aef21..be86483d03 100644 --- a/modules/@angular/router/build/src/directives/router_outlet.js +++ b/modules/@angular/router/build/src/directives/router_outlet.js @@ -24,6 +24,15 @@ var RouterOutlet = (function () { enumerable: true, configurable: true }); + Object.defineProperty(RouterOutlet.prototype, "component", { + get: function () { + if (!this.activated) + throw new Error("Outlet is not activated"); + return this.activated.instance; + }, + enumerable: true, + configurable: true + }); RouterOutlet.prototype.deactivate = function () { if (this.activated) { this.activated.destroy(); @@ -43,4 +52,4 @@ var RouterOutlet = (function () { return RouterOutlet; }()); exports.RouterOutlet = RouterOutlet; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUFBLHFCQUFxSSxlQUFlLENBQUMsQ0FBQTtBQUNySixrQ0FBOEIsc0JBQXNCLENBQUMsQ0FBQTtBQUNyRCx1QkFBNkIsV0FBVyxDQUFDLENBQUE7QUFHekM7SUFJRSxzQkFBWSxlQUErQixFQUFVLFFBQXlCLEVBQy9DLElBQVc7UUFEVyxhQUFRLEdBQVIsUUFBUSxDQUFpQjtRQUU1RSxlQUFlLENBQUMsY0FBYyxDQUFDLElBQUksR0FBRyxJQUFJLEdBQUcsdUJBQWMsRUFBRSxJQUFJLENBQUMsQ0FBQztJQUNyRSxDQUFDO0lBRUQsc0JBQUkscUNBQVc7YUFBZixjQUE2QixNQUFNLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDOzs7T0FBQTtJQUV2RCxpQ0FBVSxHQUFWO1FBQ0UsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxD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XN0cm95KCk7XG4gICAgICB0aGlzLmFjdGl2YXRlZCA9IG51bGw7XG4gICAgfVxuICB9XG5cbiAgYWN0aXZhdGUoZmFjdG9yeTogQ29tcG9uZW50RmFjdG9yeTxhbnk+LCBwcm92aWRlcnM6IFJlc29sdmVkUmVmbGVjdGl2ZVByb3ZpZGVyW10sXG4gICAgICAgICAgIG91dGxldE1hcDogUm91dGVyT3V0bGV0TWFwKTogdm9pZCB7XG4gICAgdGhpcy5vdXRsZXRNYXAgPSBvdXRsZXRNYXA7XG4gICAgY29uc3QgaW5qID0gUmVmbGVjdGl2ZUluamVjdG9yLmZyb21SZXNvbHZlZFByb3ZpZGVycyhwcm92aWRlcnMsIHRoaXMubG9jYXRpb24ucGFyZW50SW5qZWN0b3IpO1xuICAgIHRoaXMuYWN0aXZhdGVkID0gdGhpcy5sb2NhdGlvbi5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSwgdGhpcy5sb2NhdGlvbi5sZW5ndGgsIGluaiwgW10pO1xuICB9XG59XG4iXX0= \ 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 fa2554c9bb..601ce3ec01 100644 --- a/modules/@angular/router/build/src/index.d.ts +++ b/modules/@angular/router/build/src/index.d.ts @@ -1,11 +1,12 @@ export { Router } from './router'; export { UrlSerializer, DefaultUrlSerializer } from './url_serializer'; -export { RouterState, ActivatedRoute } from './router_state'; +export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state'; export { UrlTree, UrlSegment } from './url_tree'; export { RouterOutletMap } from './router_outlet_map'; export { RouterConfig, Route } from './config'; export { Params, PRIMARY_OUTLET } from './shared'; export { provideRouter } from './router_providers'; +export { CanActivate, CanDeactivate } from './interfaces'; import { RouterOutlet } from './directives/router_outlet'; import { RouterLink } from './directives/router_link'; export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink)[]; diff --git a/modules/@angular/router/build/src/index.js b/modules/@angular/router/build/src/index.js index 7e4524c7d9..19576f67af 100644 --- a/modules/@angular/router/build/src/index.js +++ b/modules/@angular/router/build/src/index.js @@ -7,6 +7,8 @@ exports.DefaultUrlSerializer = url_serializer_1.DefaultUrlSerializer; var router_state_1 = require('./router_state'); exports.RouterState = router_state_1.RouterState; exports.ActivatedRoute = router_state_1.ActivatedRoute; +exports.RouterStateSnapshot = router_state_1.RouterStateSnapshot; +exports.ActivatedRouteSnapshot = router_state_1.ActivatedRouteSnapshot; var url_tree_1 = require('./url_tree'); exports.UrlTree = url_tree_1.UrlTree; exports.UrlSegment = url_tree_1.UrlSegment; @@ -19,4 +21,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHVCQUF1QixVQUFVLENBQUM7QUFBekIsaUNBQXlCO0FBQ2xDLCtCQUFvRCxrQkFBa0IsQ0FBQztBQUE5RCx1REFBYTtBQUFFLHFFQUErQztBQUN2RSw2QkFBNEMsZ0JBQWdCLENBQUM7QUFBcEQsaURBQVc7QUFBRSx1REFBdUM7QUFDN0QseUJBQW1DLFlBQVksQ0FBQztBQUF2QyxxQ0FBTztBQUFFLDJDQUE4QjtBQUNoRCxrQ0FBZ0MscUJBQXFCLENBQUM7QUFBN0MsOERBQTZDO0FBRXRELHVCQUF1QyxVQUFVLENBQUM7QUFBakMsaURBQWlDO0FBQ2xELGlDQUE4QixvQkFBb0IsQ0FBQztBQUExQyx5REFBMEM7QUFFbkQsOEJBQTZCLDRCQUE0QixDQUFDLENBQUE7QUFDMUQsNEJBQTJCLDBCQUEwQixDQUFDLENBQUE7QUFFekMseUJBQWlCLEdBQUcsQ0FBQyw0QkFBWSxFQUFFLHdCQUFVLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IFJvdXRlciB9IGZyb20gJy4vcm91dGVyJztcbmV4cG9ydCB7IFVybFNlcmlhbGl6ZXIsIERlZmF1bHRVcmxTZXJpYWxpemVyIH0gZnJvbSAnLi91cmxfc2VyaWFsaXplcic7XG5leHBvcnQgeyBSb3V0ZXJTdGF0ZSwgQWN0aXZhdGVkUm91dGUgfSBmcm9tICcuL3JvdXRlcl9zdGF0ZSc7XG5leHBvcnQgeyBVcmxUcmVlLCBVcmxTZWdtZW50fSBmcm9tICcuL3VybF90cmVlJztcbmV4cG9ydCB7IFJvdXRlck91dGxldE1hcCB9IGZyb20gJy4vcm91dGVyX291dGxldF9tYXAnO1xuZXhwb3J0IHsgUm91dGVyQ29uZmlnLCBSb3V0ZSB9IGZyb20gJy4vY29uZmlnJztcbmV4cG9ydCB7IFBhcmFtcywgUFJJTUFSWV9PVVRMRVQgfSBmcm9tICcuL3NoYXJlZCc7XG5leHBvcnQgeyBwcm92aWRlUm91dGVyIH0gZnJvbSAnLi9yb3V0ZXJfcHJvdmlkZXJzJztcblxuaW1wb3J0IHsgUm91dGVyT3V0bGV0IH0gZnJvbSAnLi9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQnO1xuaW1wb3J0IHsgUm91dGVyTGluayB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfbGluayc7XG5cbmV4cG9ydCBjb25zdCBST1VURVJfRElSRUNUSVZFUyA9IFtSb3V0ZXJPdXRsZXQsIFJvdXRlckxpbmtdOyJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZ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eyBSb3V0ZXJDb25maWcsIFJvdXRlIH0gZnJvbSAnLi9jb25maWcnO1xuZXhwb3J0IHsgUGFyYW1zLCBQUklNQVJZX09VVExFVCB9IGZyb20gJy4vc2hhcmVkJztcbmV4cG9ydCB7IHByb3ZpZGVSb3V0ZXIgfSBmcm9tICcuL3JvdXRlcl9wcm92aWRlcnMnO1xuZXhwb3J0IHsgQ2FuQWN0aXZhdGUsIENhbkRlYWN0aXZhdGUgfSBmcm9tICcuL2ludGVyZmFjZXMnO1xuXG5pbXBvcnQgeyBSb3V0ZXJPdXRsZXQgfSBmcm9tICcuL2RpcmVjdGl2ZXMvcm91dGVyX291dGxldCc7XG5pbXBvcnQgeyBSb3V0ZXJMaW5rIH0gZnJvbSAnLi9kaXJlY3RpdmVzL3JvdXRlcl9saW5rJztcblxuZXhwb3J0IGNvbnN0IFJPVVRFUl9ESVJFQ1RJVkVTID0gW1JvdXRlck91dGxldCwgUm91dGVyTGlua107Il19 \ No newline at end of file diff --git a/modules/@angular/router/build/src/interfaces.d.ts b/modules/@angular/router/build/src/interfaces.d.ts new file mode 100644 index 0000000000..ded9c1ede9 --- /dev/null +++ b/modules/@angular/router/build/src/interfaces.d.ts @@ -0,0 +1,8 @@ +import { Observable } from 'rxjs/Observable'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from './router_state'; +export interface CanActivate { + canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean; +} +export interface CanDeactivate { + canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean; +} diff --git a/modules/@angular/router/build/src/interfaces.js b/modules/@angular/router/build/src/interfaces.js new file mode 100644 index 0000000000..55b1366458 --- /dev/null +++ b/modules/@angular/router/build/src/interfaces.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge09ic2VydmFibGV9IGZyb20gJ3J4anMvT2JzZXJ2YWJsZSc7XG5pbXBvcnQge0FjdGl2YXRlZFJvdXRlU25hcHNob3QsIFJvdXRlclN0YXRlU25hcHNob3R9IGZyb20gJy4vcm91dGVyX3N0YXRlJztcblxuLyoqXG4gKiBBbiBpbnRlcmZhY2UgYSBjbGFzcyBjYW4gaW1wbGVtZW50IHRvIGJlIGEgZ3VhcmQgZGVjaWRpbmcgaWYgYSByb3V0ZSBjYW4gYmUgYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkFjdGl2YXRlIHtcbiAgY2FuQWN0aXZhdGUocm91dGU6QWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6Um91dGVyU3RhdGVTbmFwc2hvdCk6T2JzZXJ2YWJsZTxib29sZWFuPiB8IGJvb2xlYW47XG59XG5cbi8qKlxuICogQW4gaW50ZXJmYWNlIGEgY2xhc3MgY2FuIGltcGxlbWVudCB0byBiZSBhIGd1YXJkIGRlY2lkaW5nIGlmIGEgcm91dGUgY2FuIGJlIGRlYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkRlYWN0aXZhdGU8VD4ge1xuICBjYW5EZWFjdGl2YXRlKGNvbXBvbmVudDpULCByb3V0ZTpBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LCBzdGF0ZTpSb3V0ZXJTdGF0ZVNuYXBzaG90KTpPYnNlcnZhYmxlPGJvb2xlYW4+IHwgYm9vbGVhbjtcbn0iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/recognize.d.ts b/modules/@angular/router/build/src/recognize.d.ts index 64aeb9f2f7..fbfa415c1f 100644 --- a/modules/@angular/router/build/src/recognize.d.ts +++ b/modules/@angular/router/build/src/recognize.d.ts @@ -1,5 +1,6 @@ import { UrlTree } from './url_tree'; -import { RouterState } from './router_state'; +import { RouterStateSnapshot } from './router_state'; import { RouterConfig } from './config'; +import { Type } from '@angular/core'; import { Observable } from 'rxjs/Observable'; -export declare function recognize(config: RouterConfig, url: UrlTree, existingState: RouterState): Observable; +export declare function recognize(rootComponentType: Type, config: RouterConfig, url: UrlTree): Observable; diff --git a/modules/@angular/router/build/src/recognize.js b/modules/@angular/router/build/src/recognize.js index 0b4cb3fbe6..fc75901e7d 100644 --- a/modules/@angular/router/build/src/recognize.js +++ b/modules/@angular/router/build/src/recognize.js @@ -4,14 +4,11 @@ var tree_1 = require('./utils/tree'); var router_state_1 = require('./router_state'); var shared_1 = require('./shared'); var Observable_1 = require('rxjs/Observable'); -var BehaviorSubject_1 = require('rxjs/BehaviorSubject'); -function recognize(config, url, existingState) { +function recognize(rootComponentType, config, url) { try { - var match_1 = new MatchResult(existingState.root.component, config, [url.root], {}, tree_1.rootNode(url).children, [], shared_1.PRIMARY_OUTLET); - existingState.queryParams.next(url.queryParameters); - existingState.fragment.next(url.fragment); - var roots = constructActivatedRoute(match_1, tree_1.rootNode(existingState)); - var res_1 = new router_state_1.RouterState(roots[0], existingState.queryParams, existingState.fragment); + var match_1 = new MatchResult(rootComponentType, config, [url.root], {}, url._root.children, [], shared_1.PRIMARY_OUTLET, null, url.root); + var roots = constructActivatedRoute(match_1); + var res_1 = new router_state_1.RouterStateSnapshot(roots[0], url.queryParameters, url.fragment); return new Observable_1.Observable(function (obs) { obs.next(res_1); obs.complete(); @@ -22,38 +19,36 @@ function recognize(config, url, existingState) { } } exports.recognize = recognize; -function constructActivatedRoute(match, existingRoute) { - var activatedRoute = createOrReuseRoute(match, existingRoute); - var existingChildren = existingRoute ? existingRoute.children : []; - if (match.leftOverUrl.length > 0) { - var children = recognizeMany(match.children, match.leftOverUrl, existingChildren); - checkOutletNameUniqueness(children); - return [new tree_1.TreeNode(activatedRoute, children)]; - } - else { - return [new tree_1.TreeNode(activatedRoute, [])]; - } +function constructActivatedRoute(match) { + var activatedRoute = createActivatedRouteSnapshot(match); + var children = match.leftOverUrl.length > 0 ? + recognizeMany(match.children, match.leftOverUrl) : recognizeLeftOvers(match.children, match.lastUrlSegment); + checkOutletNameUniqueness(children); + children.sort(function (a, b) { + if (a.value.outlet === shared_1.PRIMARY_OUTLET) + return -1; + if (b.value.outlet === shared_1.PRIMARY_OUTLET) + return 1; + return a.value.outlet.localeCompare(b.value.outlet); + }); + return [new tree_1.TreeNode(activatedRoute, children)]; } -function recognizeMany(config, urls, existingRoutes) { - return collection_1.flatten(urls.map(function (url) { return recognizeOne(config, url, existingRoutes); })); +function recognizeLeftOvers(config, lastUrlSegment) { + if (!config) + return []; + var mIndex = matchIndex(config, [], lastUrlSegment); + return mIndex ? constructActivatedRoute(mIndex) : []; } -function createOrReuseRoute(match, existing) { - if (existing) { - var v = existing.value; - if (v.component === match.component && v.outlet === match.outlet) { - (v.params).next(match.parameters); - (v.urlSegments).next(match.consumedUrlSegments); - return v; - } - } - return new router_state_1.ActivatedRoute(new BehaviorSubject_1.BehaviorSubject(match.consumedUrlSegments), new BehaviorSubject_1.BehaviorSubject(match.parameters), match.outlet, match.component); +function recognizeMany(config, urls) { + return collection_1.flatten(urls.map(function (url) { return recognizeOne(config, url); })); } -function recognizeOne(config, url, existingRoutes) { +function createActivatedRouteSnapshot(match) { + return new router_state_1.ActivatedRouteSnapshot(match.consumedUrlSegments, match.parameters, match.outlet, match.component, match.route, match.lastUrlSegment); +} +function recognizeOne(config, url) { var m = match(config, url); - var routesWithRightOutlet = existingRoutes.filter(function (r) { return r.value.outlet == m.outlet; }); - var routeWithRightOutlet = routesWithRightOutlet.length > 0 ? routesWithRightOutlet[0] : null; - var primary = constructActivatedRoute(m, routeWithRightOutlet); - var secondary = recognizeMany(config, m.secondary, existingRoutes); + var primary = constructActivatedRoute(m); + var secondary = recognizeMany(config, m.secondary); var res = primary.concat(secondary); checkOutletNameUniqueness(res); return res; @@ -63,8 +58,8 @@ function checkOutletNameUniqueness(nodes) { nodes.forEach(function (n) { var routeWithSameOutletName = names[n.value.outlet]; if (routeWithSameOutletName) { - var p = routeWithSameOutletName.urlSegments.value.map(function (s) { return s.toString(); }).join("/"); - var c = n.value.urlSegments.value.map(function (s) { return s.toString(); }).join("/"); + var p = routeWithSameOutletName.urlSegments.map(function (s) { return s.toString(); }).join("/"); + var c = n.value.urlSegments.map(function (s) { return s.toString(); }).join("/"); throw new Error("Two segments cannot have the same outlet name: '" + p + "' and '" + c + "'."); } names[n.value.outlet] = n.value; @@ -75,7 +70,7 @@ function match(config, url) { var m = matchNonIndex(config, url); if (m) return m; - var mIndex = matchIndex(config, url); + var mIndex = matchIndex(config, [url], url.value); if (mIndex) return mIndex; var availableRoutes = config.map(function (r) { @@ -93,13 +88,13 @@ function matchNonIndex(config, url) { } return null; } -function matchIndex(config, url) { +function matchIndex(config, leftOverUrls, lastUrlSegment) { for (var _i = 0, config_2 = config; _i < config_2.length; _i++) { var r = config_2[_i]; if (r.index) { var outlet = r.outlet ? r.outlet : shared_1.PRIMARY_OUTLET; var children = r.children ? r.children : []; - return new MatchResult(r.component, children, [], {}, [url], [], outlet); + return new MatchResult(r.component, children, [], lastUrlSegment.parameters, leftOverUrls, [], outlet, r, lastUrlSegment); } } return null; @@ -118,7 +113,7 @@ function matchWithParts(route, url) { u = collection_1.first(u.children); } var last = consumedUrl[consumedUrl.length - 1]; - return new MatchResult(route.component, [], consumedUrl, last.parameters, [], [], shared_1.PRIMARY_OUTLET); + return new MatchResult(route.component, [], consumedUrl, last.parameters, [], [], shared_1.PRIMARY_OUTLET, route, last); } var parts = path.split("/"); var positionalParams = {}; @@ -154,10 +149,10 @@ function matchWithParts(route, url) { var secondarySubtrees = lastParent ? lastParent.children.slice(1) : []; var children = route.children ? route.children : []; var outlet = route.outlet ? route.outlet : shared_1.PRIMARY_OUTLET; - return new MatchResult(route.component, children, consumedUrlSegments, parameters, lastSegment.children, secondarySubtrees, outlet); + return new MatchResult(route.component, children, consumedUrlSegments, parameters, lastSegment.children, secondarySubtrees, outlet, route, lastSegment.value); } var MatchResult = (function () { - function MatchResult(component, children, consumedUrlSegments, parameters, leftOverUrl, secondary, outlet) { + function MatchResult(component, children, consumedUrlSegments, parameters, leftOverUrl, secondary, outlet, route, lastUrlSegment) { this.component = component; this.children = children; this.consumedUrlSegments = consumedUrlSegments; @@ -165,7 +160,9 @@ var MatchResult = (function () { this.leftOverUrl = leftOverUrl; this.secondary = secondary; this.outlet = outlet; + this.route = route; + this.lastUrlSegment = lastUrlSegment; } return MatchResult; }()); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb2duaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JlY29nbml6ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsMkJBQXNDLG9CQUFvQixDQUFDLENBQUE7QUFDM0QscUJBQW1DLGNBQWMsQ0FBQyxDQUFBO0FBQ2xELDZCQUE0QyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQzdELHVCQUF1QyxVQUFVLENBQUMsQ0FBQTtBQUdsRCwyQkFBMkIsaUJBQWlCLENBQUMsQ0FBQTtBQUM3QyxnQ0FBZ0Msc0JBQXNCLENBQUMsQ0FBQTtBQUV2RCxtQkFBMEIsTUFBb0IsRUFBRSxHQUFZLEVBQUUsYUFBMEI7SUFDdEYsSUFBSSxDQUFDO1FBQ0gsSUFBTSxPQUFLLEdBQUcsSUFBSSxXQUFXLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsRUFBRSxlQUFRLENBQUMsR0FBRyxDQUFDLENBQUMsUUFBUSxFQUFFLEVBQUUsRUFBRSx1QkFBYyxDQUFDLENBQUM7UUFDMUgsYUF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AgICAgcHVibGljIGNoaWxkcmVuOiBSb3V0ZVtdLFxuICAgICAgICAgICAgICBwdWJsaWMgY29uc3VtZWRVcmxTZWdtZW50czogVXJsU2VnbWVudFtdLFxuICAgICAgICAgICAgICBwdWJsaWMgcGFyYW1ldGVyczoge1trZXk6IHN0cmluZ106IHN0cmluZ30sXG4gICAgICAgICAgICAgIHB1YmxpYyBsZWZ0T3ZlclVybDogVHJlZU5vZGU8VXJsU2VnbWVudD5bXSxcbiAgICAgICAgICAgICAgcHVibGljIHNlY29uZGFyeTogVHJlZU5vZGU8VXJsU2VnbWVudD5bXSxcbiAgICAgICAgICAgICAgcHVibGljIG91dGxldDogc3RyaW5nXG4gICkge31cbn0iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb2duaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JlY29nbml6ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsMkJBQXNDLG9CQUFvQixDQUFDLENBQUE7QUFDM0QscUJBQXlCLGNBQWMsQ0FBQyxDQUFBO0FBQ3hDLDZCQUE0RCxnQkFBZ0IsQ0FBQyxDQUFBO0FBQzdFLHVCQUF1QyxVQUFVLENBQUMsQ0FBQTtBQUdsRCwyQkFBMkIsaUJBQWlCLENBQUMsQ0FBQTtBQUU3QyxtQkFBMEIsaUJBQXVCLEVBQUUsTUFBb0IsRUFBRSxHQUFZO0lBQ25GLElBQUksQ0FBQztRQUNILElBQU0sT0FBSyxHQUFHLElBQUksV0FBVyxDQUFDLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRSxFQUFFLEVBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxRQUFRLEVBQUUsRUFBRSxFQUFFLHVCQUFjLEVBQUUsSUFBSSxFQUFFLEdBQUcsQ0F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W50cywgcGFyYW1ldGVycywgbGFzdFNlZ21lbnQuY2hpbGRyZW4sXG4gICAgc2Vjb25kYXJ5U3VidHJlZXMsIG91dGxldCwgcm91dGUsIGxhc3RTZWdtZW50LnZhbHVlKTtcbn1cblxuY2xhc3MgTWF0Y2hSZXN1bHQge1xuICBjb25zdHJ1Y3RvcihwdWJsaWMgY29tcG9uZW50OiBUeXBlIHwgc3RyaW5nLFxuICAgICAgICAgICAgICBwdWJsaWMgY2hpbGRyZW46IFJvdXRlW10sXG4gICAgICAgICAgICAgIHB1YmxpYyBjb25zdW1lZFVybFNlZ21lbnRzOiBVcmxTZWdtZW50W10sXG4gICAgICAgICAgICAgIHB1YmxpYyBwYXJhbWV0ZXJzOiB7W2tleTogc3RyaW5nXTogc3RyaW5nfSxcbiAgICAgICAgICAgICAgcHVibGljIGxlZnRPdmVyVXJsOiBUcmVlTm9kZTxVcmxTZWdtZW50PltdLFxuICAgICAgICAgICAgICBwdWJsaWMgc2Vjb25kYXJ5OiBUcmVlTm9kZTxVcmxTZWdtZW50PltdLFxuICAgICAgICAgICAgICBwdWJsaWMgb3V0bGV0OiBzdHJpbmcsXG4gICAgICAgICAgICAgIHB1YmxpYyByb3V0ZTogUm91dGUgfCBudWxsLFxuICAgICAgICAgICAgICBwdWJsaWMgbGFzdFVybFNlZ21lbnQ6IFVybFNlZ21lbnRcbiAgKSB7fVxufSJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/src/resolve.d.ts b/modules/@angular/router/build/src/resolve.d.ts new file mode 100644 index 0000000000..edd764fbc7 --- /dev/null +++ b/modules/@angular/router/build/src/resolve.d.ts @@ -0,0 +1,6 @@ +import { RouterStateSnapshot } from './router_state'; +import { ComponentResolver } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/toPromise'; +export declare function resolve(resolver: ComponentResolver, state: RouterStateSnapshot): Observable; diff --git a/modules/@angular/router/build/src/resolve.js b/modules/@angular/router/build/src/resolve.js new file mode 100644 index 0000000000..1cbe87af3d --- /dev/null +++ b/modules/@angular/router/build/src/resolve.js @@ -0,0 +1,25 @@ +"use strict"; +require('rxjs/add/operator/map'); +var forkJoin_1 = require('rxjs/observable/forkJoin'); +var fromPromise_1 = require('rxjs/observable/fromPromise'); +require('rxjs/add/operator/toPromise'); +function resolve(resolver, state) { + return resolveNode(resolver, state._root).map(function (_) { return state; }); +} +exports.resolve = resolve; +function resolveNode(resolver, node) { + if (node.children.length === 0) { + return fromPromise_1.fromPromise(resolver.resolveComponent(node.value.component).then(function (factory) { + node.value._resolvedComponentFactory = factory; + return node.value; + })); + } + else { + var c = node.children.map(function (c) { return resolveNode(resolver, c).toPromise(); }); + return forkJoin_1.forkJoin(c).map(function (_) { return resolver.resolveComponent(node.value.component).then(function (factory) { + node.value._resolvedComponentFactory = factory; + return node.value; + }); }); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXNvbHZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFJQSxRQUFPLHVCQUF1QixDQUFDLENBQUE7QUFDL0IseUJBQXVCLDBCQUEwQixDQUFDLENBQUE7QUFDbEQsNEJBQTBCLDZCQUE2QixDQUFDLENBQUE7QUFDeEQsUUFBTyw2QkFBNkIsQ0FBQyxDQUFBO0FBRXJDLGlCQUF3QixRQUEyQixFQUFFLEtBQTBCO0lBQzdFLE1BQU0sQ0FBQyxXQUFXLENBQUMsUUFBUSxFQUFFLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxLQUFLLEVBQUwsQ0FBSyxDQUFDLENBQUM7QUFDNUQsQ0FBQztBQUZlLGVBQU8sVUFFdEIsQ0FBQTtBQUVELHFCQUFxQixRQUEyQixFQUFFL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ID0+IHtcbiAgICAgIG5vZGUudmFsdWUuX3Jlc29sdmVkQ29tcG9uZW50RmFjdG9yeSA9IGZhY3Rvcnk7XG4gICAgICByZXR1cm4gbm9kZS52YWx1ZTtcbiAgICB9KSk7XG4gICAgXG4gIH0gZWxzZSB7XG4gICAgY29uc3QgYyA9IG5vZGUuY2hpbGRyZW4ubWFwKGMgPT4gcmVzb2x2ZU5vZGUocmVzb2x2ZXIsIGMpLnRvUHJvbWlzZSgpKTtcbiAgICByZXR1cm4gZm9ya0pvaW4oYykubWFwKF8gPT4gcmVzb2x2ZXIucmVzb2x2ZUNvbXBvbmVudCg8YW55Pm5vZGUudmFsdWUuY29tcG9uZW50KS50aGVuKGZhY3RvcnkgPT4ge1xuICAgICAgbm9kZS52YWx1ZS5fcmVzb2x2ZWRDb21wb25lbnRGYWN0b3J5ID0gZmFjdG9yeTtcbiAgICAgIHJldHVybiBub2RlLnZhbHVlO1xuICAgIH0pKTtcbiAgfVxufSJdfQ== \ 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 7fd1b6a794..8d2ce7d290 100644 --- a/modules/@angular/router/build/src/router.d.ts +++ b/modules/@angular/router/build/src/router.d.ts @@ -1,4 +1,4 @@ -import { ComponentResolver } from '@angular/core'; +import { ComponentResolver, Type, Injector } from '@angular/core'; import { Location } from '@angular/common'; import { UrlSerializer } from './url_serializer'; import { RouterOutletMap } from './router_outlet_map'; @@ -8,24 +8,25 @@ import { RouterState, ActivatedRoute } from './router_state'; import { RouterConfig } from './config'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; -import 'rxjs/add/operator/toPromise'; export interface NavigationExtras { relativeTo?: ActivatedRoute; queryParameters?: Params; fragment?: string; } export declare class Router { - private rootComponent; + private rootComponentType; private resolver; private urlSerializer; private outletMap; private location; + private injector; private currentUrlTree; private currentRouterState; private config; private locationSubscription; - constructor(rootComponent: Object, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location); + constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector); readonly routerState: RouterState; readonly urlTree: UrlTree; navigateByUrl(url: string): Observable; diff --git a/modules/@angular/router/build/src/router.js b/modules/@angular/router/build/src/router.js index 3bbb164b96..03da50d365 100644 --- a/modules/@angular/router/build/src/router.js +++ b/modules/@angular/router/build/src/router.js @@ -2,26 +2,28 @@ var core_1 = require('@angular/core'); var router_outlet_map_1 = require('./router_outlet_map'); var recognize_1 = require('./recognize'); -var tree_1 = require('./utils/tree'); +var resolve_1 = require('./resolve'); +var create_router_state_1 = require('./create_router_state'); var url_tree_1 = require('./url_tree'); 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'); require('rxjs/add/operator/map'); +require('rxjs/add/operator/scan'); require('rxjs/add/operator/mergeMap'); -require('rxjs/add/operator/toPromise'); -var fromPromise_1 = require('rxjs/observable/fromPromise'); +var of_1 = require('rxjs/observable/of'); var forkJoin_1 = require('rxjs/observable/forkJoin'); var Router = (function () { - function Router(rootComponent, resolver, urlSerializer, outletMap, location) { - this.rootComponent = rootComponent; + function Router(rootComponentType, resolver, urlSerializer, outletMap, location, injector) { + this.rootComponentType = rootComponentType; this.resolver = resolver; this.urlSerializer = urlSerializer; this.outletMap = outletMap; this.location = location; + this.injector = injector; this.currentUrlTree = url_tree_1.createEmptyUrlTree(); - this.currentRouterState = router_state_1.createEmptyState(rootComponent.constructor); + this.currentRouterState = router_state_1.createEmptyState(rootComponentType); this.setUpLocationChangeListener(); this.navigateByUrl(this.location.path()); } @@ -66,57 +68,167 @@ var Router = (function () { }; Router.prototype.runNavigate = function (url, pop) { var _this = this; - var r = recognize_1.recognize(this.config, url, this.currentRouterState).mergeMap(function (newState) { - return new ActivateRoutes(_this.resolver, newState, _this.currentRouterState).activate(_this.outletMap).map(function () { - _this.currentUrlTree = url; - _this.currentRouterState = newState; - if (!pop) { - _this.location.go(_this.urlSerializer.serialize(url)); - } - }); + 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); + }); + 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)); + } }); - r.subscribe(function (a) { }, function (e) { }, function () { }); return r; }; return Router; }()); exports.Router = Router; +var CanActivate = (function () { + function CanActivate(route) { + this.route = route; + } + return CanActivate; +}()); +var CanDeactivate = (function () { + function CanDeactivate(component, route) { + this.component = component; + this.route = route; + } + return CanDeactivate; +}()); +var GuardChecks = (function () { + function GuardChecks(future, curr, injector) { + this.future = future; + this.curr = curr; + this.injector = injector; + this.checks = []; + } + GuardChecks.prototype.check = function (parentOutletMap) { + var _this = this; + var futureRoot = this.future._root; + var currRoot = this.curr ? this.curr._root : null; + this.traverseChildRoutes(futureRoot, currRoot, parentOutletMap); + if (this.checks.length === 0) + return of_1.of(true); + return forkJoin_1.forkJoin(this.checks.map(function (s) { + if (s instanceof CanActivate) { + return _this.runCanActivate(s.route); + } + else if (s instanceof CanDeactivate) { + return _this.runCanDeactivate(s.component, s.route); + } + else { + throw new Error("Cannot be reached"); + } + })).map(collection_1.and); + }; + GuardChecks.prototype.traverseChildRoutes = function (futureNode, currNode, outletMap) { + var _this = this; + var prevChildren = nodeChildrenAsMap(currNode); + futureNode.children.forEach(function (c) { + _this.traverseRoutes(c, prevChildren[c.value.outlet], outletMap); + delete prevChildren[c.value.outlet]; + }); + collection_1.forEach(prevChildren, function (v, k) { return _this.deactivateOutletAndItChildren(v, outletMap._outlets[k]); }); + }; + GuardChecks.prototype.traverseRoutes = function (futureNode, currNode, parentOutletMap) { + var future = futureNode.value; + var curr = currNode ? currNode.value : null; + var outlet = parentOutletMap ? parentOutletMap._outlets[futureNode.value.outlet] : null; + if (curr && future._routeConfig === curr._routeConfig) { + if (!collection_1.shallowEqual(future.params, curr.params)) { + this.checks.push(new CanDeactivate(outlet.component, curr), new CanActivate(future)); + } + this.traverseChildRoutes(futureNode, currNode, outlet ? outlet.outletMap : null); + } + else { + this.deactivateOutletAndItChildren(curr, outlet); + this.checks.push(new CanActivate(future)); + this.traverseChildRoutes(futureNode, null, outlet ? outlet.outletMap : null); + } + }; + GuardChecks.prototype.deactivateOutletAndItChildren = function (route, outlet) { + var _this = this; + if (outlet && outlet.isActivated) { + collection_1.forEach(outlet.outletMap._outlets, function (v, k) { return _this.deactivateOutletAndItChildren(v, outlet.outletMap._outlets[k]); }); + this.checks.push(new CanDeactivate(outlet.component, route)); + } + }; + GuardChecks.prototype.runCanActivate = function (future) { + var _this = this; + var canActivate = future._routeConfig ? future._routeConfig.canActivate : null; + if (!canActivate || canActivate.length === 0) + return of_1.of(true); + return forkJoin_1.forkJoin(canActivate.map(function (c) { + var guard = _this.injector.get(c); + if (guard.canActivate) { + return of_1.of(guard.canActivate(future, _this.future)); + } + else { + return of_1.of(guard(future, _this.future)); + } + })).map(collection_1.and); + }; + GuardChecks.prototype.runCanDeactivate = function (component, curr) { + var _this = this; + var canDeactivate = curr._routeConfig ? curr._routeConfig.canDeactivate : null; + if (!canDeactivate || canDeactivate.length === 0) + return of_1.of(true); + return forkJoin_1.forkJoin(canDeactivate.map(function (c) { + var guard = _this.injector.get(c); + if (guard.canDeactivate) { + return of_1.of(guard.canDeactivate(component, curr, _this.curr)); + } + else { + return of_1.of(guard(component, curr, _this.curr)); + } + })).map(collection_1.and); + }; + return GuardChecks; +}()); var ActivateRoutes = (function () { - function ActivateRoutes(resolver, futureState, currState) { - this.resolver = resolver; + function ActivateRoutes(futureState, currState) { this.futureState = futureState; this.currState = currState; } ActivateRoutes.prototype.activate = function (parentOutletMap) { - var currRoot = this.currState ? tree_1.rootNode(this.currState) : null; - var futureRoot = tree_1.rootNode(this.futureState); - return this.activateChildRoutes(futureRoot, currRoot, parentOutletMap); + var futureRoot = this.futureState._root; + var currRoot = this.currState ? this.currState._root : null; + pushQueryParamsAndFragment(this.futureState); + this.activateChildRoutes(futureRoot, currRoot, parentOutletMap); }; ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, outletMap) { var _this = this; var prevChildren = nodeChildrenAsMap(currNode); - var observables = []; futureNode.children.forEach(function (c) { - observables.push(_this.activateRoutes(c, prevChildren[c.value.outlet], outletMap).toPromise()); + _this.activateRoutes(c, prevChildren[c.value.outlet], outletMap); delete prevChildren[c.value.outlet]; }); collection_1.forEach(prevChildren, function (v, k) { return _this.deactivateOutletAndItChildren(outletMap._outlets[k]); }); - return forkJoin_1.forkJoin(observables); }; ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentOutletMap) { - var _this = this; var future = futureNode.value; var curr = currNode ? currNode.value : null; var outlet = getOutlet(parentOutletMap, futureNode.value); if (future === curr) { - return this.activateChildRoutes(futureNode, currNode, outlet.outletMap); + router_state_1.advanceActivatedRoute(future); + this.activateChildRoutes(futureNode, currNode, outlet.outletMap); } else { this.deactivateOutletAndItChildren(outlet); - var outletMap_1 = new router_outlet_map_1.RouterOutletMap(); - return this.activateNewRoutes(outletMap_1, future, outlet).mergeMap(function () { - return _this.activateChildRoutes(futureNode, currNode, outletMap_1); - }); + var outletMap = new router_outlet_map_1.RouterOutletMap(); + this.activateNewRoutes(outletMap, future, outlet); + this.activateChildRoutes(futureNode, null, outletMap); } }; ActivateRoutes.prototype.activateNewRoutes = function (outletMap, future, outlet) { @@ -124,8 +236,8 @@ var ActivateRoutes = (function () { { provide: router_state_1.ActivatedRoute, useValue: future }, { provide: router_outlet_map_1.RouterOutletMap, useValue: outletMap } ]); - return fromPromise_1.fromPromise(this.resolver.resolveComponent(future.component)). - map(function (factory) { return outlet.activate(factory, resolved, outletMap); }); + outlet.activate(future._futureSnapshot._resolvedComponentFactory, resolved, outletMap); + router_state_1.advanceActivatedRoute(future); }; ActivateRoutes.prototype.deactivateOutletAndItChildren = function (outlet) { var _this = this; @@ -136,6 +248,14 @@ var ActivateRoutes = (function () { }; return ActivateRoutes; }()); +function pushQueryParamsAndFragment(state) { + if (!collection_1.shallowEqual(state.snapshot.queryParams, state.queryParams.value)) { + state.queryParams.next(state.snapshot.queryParams); + } + if (state.snapshot.fragment !== state.fragment.value) { + state.fragment.next(state.snapshot.fragment); + } +} function nodeChildrenAsMap(node) { return node ? node.children.reduce(function (m, c) { @@ -156,4 +276,4 @@ function getOutlet(outletMap, route) { } return outlet; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEscUJBQXNELGVBQWUsQ0FBQyxDQUFBO0FBR3RFLGtDQUFnQyxxQkFBcUIsQ0FBQyxDQUFBO0FBQ3RELDBCQUEwQixhQUFhLENBQUMsQ0FBQTtBQUN4QyxxQkFBbUMsY0FBYyxDQUFDLENBQUE7QUFDbEQseUJBQTRDLFlBQVksQ0FBQyxDQUFBO0FBQ3pELHVCQUF1QyxVQUFVLENBQUMsQ0FBQTtBQUNsRCw2QkFBNkQsZ0JBQWdCLENBQUMsQ0FBQTtBQUc5RSxnQ0FBOEIsbUJBQW1CLENBQUMsQ0FBQTtBQUNsRCwyQkFBd0Isb0JBQW9CLENBQUMsQ0FBQTtBQUc3QyxRQUFPLHVCQUF1QixDQUFDLENBQUE7QUFDL0IsUUFB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YXJhbXMpO1xuICB9XG5cbiAgaWYgKHN0YXRlLnNuYXBzaG90LmZyYWdtZW50ICE9PSAoPGFueT5zdGF0ZS5mcmFnbWVudCkudmFsdWUpIHtcbiAgICAoPGFueT5zdGF0ZS5mcmFnbWVudCkubmV4dChzdGF0ZS5zbmFwc2hvdC5mcmFnbWVudCk7XG4gIH1cbn1cblxuZnVuY3Rpb24gbm9kZUNoaWxkcmVuQXNNYXAobm9kZTogVHJlZU5vZGU8YW55PnxudWxsKSB7XG4gIHJldHVybiBub2RlID9cbiAgICBub2RlLmNoaWxkcmVuLnJlZHVjZShcbiAgICAgIChtLCBjKSA9PiB7XG4gICAgICAgIG1bYy52YWx1ZS5vdXRsZXRdID0gYztcbiAgICAgICAgcmV0dXJuIG07XG4gICAgICB9LFxuICAgICAge30pIDpcbiAge307XG59XG5cbmZ1bmN0aW9uIGdldE91dGxldChvdXRsZXRNYXA6IFJvdXRlck91dGxldE1hcCwgcm91dGU6IEFjdGl2YXRlZFJvdXRlKTogUm91dGVyT3V0bGV0IHtcbiAgbGV0IG91dGxldCA9IG91dGxldE1hcC5fb3V0bGV0c1tyb3V0ZS5vdXRsZXRdO1xuICBpZiAoIW91dGxldCkge1xuICAgIGlmIChyb3V0ZS5vdXRsZXQgPT09IFBSSU1BUllfT1VUTEVUKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYENhbm5vdCBmaW5kIHByaW1hcnkgb3V0bGV0YCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGZpbmQgdGhlIG91dGxldCAke3JvdXRlLm91dGxldH1gKTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIG91dGxldDtcbn1cbiJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/src/router_state.d.ts b/modules/@angular/router/build/src/router_state.d.ts index 569b8837ac..0a2493803c 100644 --- a/modules/@angular/router/build/src/router_state.d.ts +++ b/modules/@angular/router/build/src/router_state.d.ts @@ -1,12 +1,14 @@ import { Tree, TreeNode } from './utils/tree'; import { UrlSegment } from './url_tree'; +import { Route } from './config'; import { Params } from './shared'; import { Observable } from 'rxjs/Observable'; -import { Type } from '@angular/core'; +import { Type, ComponentFactory } from '@angular/core'; export declare class RouterState extends Tree { queryParams: Observable; fragment: Observable; - constructor(root: TreeNode, queryParams: Observable, fragment: Observable); + snapshot: RouterStateSnapshot; + constructor(root: TreeNode, queryParams: Observable, fragment: Observable, snapshot: RouterStateSnapshot); } export declare function createEmptyState(rootComponent: Type): RouterState; export declare class ActivatedRoute { @@ -14,5 +16,23 @@ export declare class ActivatedRoute { params: Observable; outlet: string; component: Type | string; - constructor(urlSegments: Observable, params: Observable, outlet: string, component: Type | string); + _futureSnapshot: ActivatedRouteSnapshot; + snapshot: ActivatedRouteSnapshot; + constructor(urlSegments: Observable, params: Observable, outlet: string, component: Type | string, futureSnapshot: ActivatedRouteSnapshot); } +export declare class ActivatedRouteSnapshot { + urlSegments: UrlSegment[]; + params: Params; + outlet: string; + component: Type | string; + _resolvedComponentFactory: ComponentFactory; + _routeConfig: Route | null; + _lastUrlSegment: UrlSegment; + constructor(urlSegments: UrlSegment[], params: Params, outlet: string, component: Type | string, routeConfig: Route | null, lastUrlSegment: UrlSegment); +} +export declare class RouterStateSnapshot extends Tree { + queryParams: Params; + fragment: string | null; + constructor(root: TreeNode, queryParams: Params, fragment: string | null); +} +export declare function advanceActivatedRoute(route: ActivatedRoute): void; diff --git a/modules/@angular/router/build/src/router_state.js b/modules/@angular/router/build/src/router_state.js index 558d05b795..97bbcab604 100644 --- a/modules/@angular/router/build/src/router_state.js +++ b/modules/@angular/router/build/src/router_state.js @@ -5,36 +5,83 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var tree_1 = require('./utils/tree'); +var collection_1 = require('./utils/collection'); var url_tree_1 = require('./url_tree'); var shared_1 = require('./shared'); var BehaviorSubject_1 = require('rxjs/BehaviorSubject'); var RouterState = (function (_super) { __extends(RouterState, _super); - function RouterState(root, queryParams, fragment) { + function RouterState(root, queryParams, fragment, snapshot) { _super.call(this, root); this.queryParams = queryParams; this.fragment = fragment; + this.snapshot = snapshot; } return RouterState; }(tree_1.Tree)); exports.RouterState = RouterState; function createEmptyState(rootComponent) { + var snapshot = createEmptyStateSnapshot(rootComponent); var emptyUrl = new BehaviorSubject_1.BehaviorSubject([new url_tree_1.UrlSegment("", {}, shared_1.PRIMARY_OUTLET)]); var emptyParams = new BehaviorSubject_1.BehaviorSubject({}); var emptyQueryParams = new BehaviorSubject_1.BehaviorSubject({}); var fragment = new BehaviorSubject_1.BehaviorSubject(""); - var activated = new ActivatedRoute(emptyUrl, emptyParams, shared_1.PRIMARY_OUTLET, rootComponent); - return new RouterState(new tree_1.TreeNode(activated, []), emptyQueryParams, fragment); + var activated = new ActivatedRoute(emptyUrl, emptyParams, shared_1.PRIMARY_OUTLET, rootComponent, snapshot.root); + activated.snapshot = snapshot.root; + return new RouterState(new tree_1.TreeNode(activated, []), emptyQueryParams, fragment, snapshot); } exports.createEmptyState = createEmptyState; +function createEmptyStateSnapshot(rootComponent) { + var rootUrlSegment = new url_tree_1.UrlSegment("", {}, shared_1.PRIMARY_OUTLET); + var emptyUrl = [rootUrlSegment]; + var emptyParams = {}; + var emptyQueryParams = {}; + var fragment = ""; + var activated = new ActivatedRouteSnapshot(emptyUrl, emptyParams, shared_1.PRIMARY_OUTLET, rootComponent, null, rootUrlSegment); + return new RouterStateSnapshot(new tree_1.TreeNode(activated, []), emptyQueryParams, fragment); +} var ActivatedRoute = (function () { - function ActivatedRoute(urlSegments, params, outlet, component) { + function ActivatedRoute(urlSegments, params, outlet, component, futureSnapshot) { this.urlSegments = urlSegments; this.params = params; this.outlet = outlet; this.component = component; + this._futureSnapshot = futureSnapshot; } return ActivatedRoute; }()); exports.ActivatedRoute = ActivatedRoute; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlI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WJqZWN0KFwiXCIpO1xuICBjb25zdCBhY3RpdmF0ZWQgPSBuZXcgQWN0aXZhdGVkUm91dGUoZW1wdHlVcmwsIGVtcHR5UGFyYW1zLCBQUklNQVJZX09VVExFVCwgcm9vdENvbXBvbmVudCk7XG4gIHJldHVybiBuZXcgUm91dGVyU3RhdGUobmV3IFRyZWVOb2RlPEFjdGl2YXRlZFJvdXRlPihhY3RpdmF0ZWQsIFtdKSwgZW1wdHlRdWVyeVBhcmFtcywgZnJhZ21lbnQpO1xufVxuXG4vKipcbiAqIENvbnRhaW5zIHRoZSBpbmZvcm1hdGlvbiBhYm91dCBhIGNvbXBvbmVudCBsb2FkZWQgaW4gYW4gb3V0bGV0LlxuICpcbiAqICMjIyBVc2FnZVxuICpcbiAqIGBgYFxuICogY2xhc3MgTXlDb21wb25lbnQge1xuICogICBjb25zdHJ1Y3Rvcihyb3V0ZTogQWN0aXZhdGVkUm91dGUpIHtcbiAqICAgICBjb25zdCBpZDogT2JzZXJ2YWJsZTxzdHJpbmc+ID0gcm91dGUucGFyYW1zLm1hcChwID0+IHAuaWQpO1xuICogICB9XG4gKiB9XG4gKiBgYGBcbiAqL1xuZXhwb3J0IGNsYXNzIEFjdGl2YXRlZFJvdXRlIHtcbiAgY29uc3RydWN0b3IocHVibGljIHVybFNlZ21lbnRzOiBPYnNlcnZhYmxlPFVybFNlZ21lbnRbXT4sXG4gICAgICAgICAgICAgIHB1YmxpYyBwYXJhbXM6IE9ic2VydmFibGU8UGFyYW1zPixcbiAgICAgICAgICAgICAgcHVibGljIG91dGxldDogc3RyaW5nLFxuICAgICAgICAgICAgICBwdWJsaWMgY29tcG9uZW50OiBUeXBlIHwgc3RyaW5nKSB7fVxufSJdfQ== \ No newline at end of file +var ActivatedRouteSnapshot = (function () { + function ActivatedRouteSnapshot(urlSegments, params, outlet, component, routeConfig, lastUrlSegment) { + this.urlSegments = urlSegments; + this.params = params; + this.outlet = outlet; + this.component = component; + this._routeConfig = routeConfig; + this._lastUrlSegment = lastUrlSegment; + } + return ActivatedRouteSnapshot; +}()); +exports.ActivatedRouteSnapshot = ActivatedRouteSnapshot; +var RouterStateSnapshot = (function (_super) { + __extends(RouterStateSnapshot, _super); + function RouterStateSnapshot(root, queryParams, fragment) { + _super.call(this, root); + this.queryParams = queryParams; + this.fragment = fragment; + } + return RouterStateSnapshot; +}(tree_1.Tree)); +exports.RouterStateSnapshot = RouterStateSnapshot; +function advanceActivatedRoute(route) { + if (route.snapshot && !collection_1.shallowEqual(route.snapshot.params, route._futureSnapshot.params)) { + route.snapshot = route._futureSnapshot; + route.urlSegments.next(route.snapshot.urlSegments); + route.params.next(route.snapshot.params); + } + else { + route.snapshot = route._futureSnapshot; + } +} +exports.advanceActivatedRoute = advanceActivatedRoute; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX3N0YXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JvdXRlcl9zdGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxQkFBK0IsY0FBYyxDQUFDLENBQUE7QUFDOUMsMkJBQTZCLG9CQUFvQixDQUFDLENBQUE7QUFDbEQseUJBQTJCLFlBQVksQ0FBQyxDQUFBO0FBRXhDLHVCQUF1QyxVQUFVLENBQUMsQ0FBQTtBQUVsRCxnQ0FBZ0Msc0JBQXNCLENBQUMsQ0FBQTtBQWtCdkQ7SUFBaUMsK0JBQW9CO0lBSW5ELHFCQUFZLElBQThCLEVBQVMsV0FBK0IsRUFBUyxRQUE0QixFQUFTLFFBQTZCO1FBQzNKLGtCQUFNLElBQUksQ0FBQyxDQUFDO1FBRHFDLGdCQUFXLEdBQVgsV0FBVyxDQUFvQjtRQUFTLGFBQVEsR0FBUixRQUFRLENBQW9CO1FBQVMsYUFBUSxHQUFSLFFBQVEsQ0FBcUI7SUFFN0osQ0FBQztJQUNILGtCQUFDO0FB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Fwc2hvdC5wYXJhbXMpKSB7XG4gICAgcm91dGUuc25hcHNob3QgPSByb3V0ZS5fZnV0dXJlU25hcHNob3Q7XG4gICAgKDxhbnk+cm91dGUudXJsU2VnbWVudHMpLm5leHQocm91dGUuc25hcHNob3QudXJsU2VnbWVudHMpO1xuICAgICg8YW55PnJvdXRlLnBhcmFtcykubmV4dChyb3V0ZS5zbmFwc2hvdC5wYXJhbXMpO1xuICB9IGVsc2Uge1xuICAgIHJvdXRlLnNuYXBzaG90ID0gcm91dGUuX2Z1dHVyZVNuYXBzaG90O1xuICB9XG59Il19 \ No newline at end of file diff --git a/modules/@angular/router/build/src/url_serializer.js b/modules/@angular/router/build/src/url_serializer.js index 987e3ba18a..28352ff41d 100644 --- a/modules/@angular/router/build/src/url_serializer.js +++ b/modules/@angular/router/build/src/url_serializer.js @@ -16,7 +16,7 @@ var DefaultUrlSerializer = (function () { return new url_tree_1.UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment()); }; DefaultUrlSerializer.prototype.serialize = function (tree) { - var node = serializeUrlTreeNode(tree_1.rootNode(tree)); + var node = serializeUrlTreeNode(tree._root); var query = serializeQueryParams(tree.queryParameters); var fragment = tree.fragment !== null ? "#" + tree.fragment : ''; return "" + node + query + fragment; @@ -221,4 +221,4 @@ var UrlParser = (function () { }; return UrlParser; }()); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3NlcmlhbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXJsX3NlcmlhbGl6ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHlCQUFvQyxZQUFZLENBQUMsQ0FBQTtBQUNqRCx1QkFBK0IsVUFBVSxDQUFDLENBQUE7QUFDMUMscUJBQW1DLGNBQWMsQ0FBQyxDQUFBO0FBS2xEO0lBQUE7SUFVQSxDQUFDO0lBQUQsb0JBQUM7QUFBRC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biAgICAgICAgdmFsdWUgPSB2YWx1ZU1hdGNoO1xuICAgICAgICB0aGlzLmNhcHR1cmUodmFsdWUpO1xuICAgICAgfVxuICAgIH1cbiAgICBwYXJhbXNba2V5XSA9IHZhbHVlO1xuICB9XG5cbiAgcGFyc2VTZWNvbmRhcnlTZWdtZW50cygpOiBUcmVlTm9kZTxVcmxTZWdtZW50PltdIHtcbiAgICB2YXIgc2VnbWVudHMgPSBbXTtcbiAgICB0aGlzLmNhcHR1cmUoJygnKTtcblxuICAgIHdoaWxlICghdGhpcy5wZWVrU3RhcnRzV2l0aCgnKScpICYmIHRoaXMucmVtYWluaW5nLmxlbmd0aCA+IDApIHtcbiAgICAgIHNlZ21lbnRzID0gc2VnbWVudHMuY29uY2F0KHRoaXMucGFyc2VTZWdtZW50cyh0cnVlKSk7XG4gICAgICBpZiAodGhpcy5wZWVrU3RhcnRzV2l0aCgnLy8nKSkge1xuICAgICAgICB0aGlzLmNhcHR1cmUoJy8vJyk7XG4gICAgICB9XG4gICAgfVxuICAgIHRoaXMuY2FwdHVyZSgnKScpO1xuXG4gICAgcmV0dXJuIHNlZ21lbnRzO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/modules/@angular/router/build/src/url_tree.js b/modules/@angular/router/build/src/url_tree.js index eb5b501d4b..c653436874 100644 --- a/modules/@angular/router/build/src/url_tree.js +++ b/modules/@angular/router/build/src/url_tree.js @@ -53,4 +53,4 @@ function equalUrlSegments(a, b) { return true; } exports.equalUrlSegments = equalUrlSegments; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXJsX3RyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscUJBQStCLGNBQWMsQ0FBQyxDQUFBO0FBQzlDLDJCQUE2QixvQkFBb0IsQ0FBQyxDQUFBO0FB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IHN0cmluZykge31cblxuICB0b1N0cmluZygpIHtcbiAgICBjb25zdCBwYXJhbXMgPSBbXTtcbiAgICBmb3IgKGxldCBwcm9wIGluIHRoaXMucGFyYW1ldGVycykge1xuICAgICAgaWYgKHRoaXMucGFyYW1ldGVycy5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICBwYXJhbXMucHVzaChgJHtwcm9wfT0ke3RoaXMucGFyYW1ldGVyc1twcm9wXX1gKTtcbiAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgcGFyYW1zU3RyaW5nID0gcGFyYW1zLmxlbmd0aCA+IDAgPyBgKCR7cGFyYW1zLmpvaW4oJywnKX0pYCA6ICcnO1xuICAgIGNvbnN0IG91dGxldCA9IHRoaXMub3V0bGV0ID09PSBQUklNQVJZX09VVExFVCA/ICcnIDogYCR7dGhpcy5vdXRsZXR9OmA7XG4gICAgcmV0dXJuIGAke291dGxldH0ke3RoaXMucGF0aH0ke3BhcmFtc1N0cmluZ31gO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlcXVhbFVybFNlZ21lbnRzKGE6IFVybFNlZ21lbnRbXSwgYjogVXJsU2VnbWVudFtdKTogYm9vbGVhbiB7XG4gIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpIHJldHVybiBmYWxzZTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBhLmxlbmd0aDsgKytpKSB7XG4gICAgaWYgKGFbaV0ucGF0aCAhPT0gYltpXS5wYXRoKSByZXR1cm4gZmFsc2U7XG4gICAgaWYgKCFzaGFsbG93RXF1YWwoYVtpXS5wYXJhbWV0ZXJzLCBiW2ldLnBhcmFtZXRlcnMpKSByZXR1cm4gZmFsc2U7XG4gIH1cbiAgcmV0dXJuIHRydWU7XG59XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cm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O1xuICAgIGlmICghc2hhbGxvd0VxdWFsKGFbaV0ucGFyYW1ldGVycywgYltpXS5wYXJhbWV0ZXJzKSkgcmV0dXJuIGZhbHNlO1xuICB9XG4gIHJldHVybiB0cnVlO1xufVxuIl19 \ No newline at end of file diff --git a/modules/@angular/router/build/src/utils/collection.d.ts b/modules/@angular/router/build/src/utils/collection.d.ts index 9df4eefaf9..8b0d7d8a67 100644 --- a/modules/@angular/router/build/src/utils/collection.d.ts +++ b/modules/@angular/router/build/src/utils/collection.d.ts @@ -5,6 +5,7 @@ export declare function shallowEqual(a: { }): boolean; export declare function flatten(a: T[][]): T[]; export declare function first(a: T[]): T | null; +export declare function and(bools: boolean[]): boolean; export declare function merge(m1: { [key: string]: V; }, m2: { diff --git a/modules/@angular/router/build/src/utils/collection.js b/modules/@angular/router/build/src/utils/collection.js index 4c1e38130d..970da0c82d 100644 --- a/modules/@angular/router/build/src/utils/collection.js +++ b/modules/@angular/router/build/src/utils/collection.js @@ -29,6 +29,10 @@ function first(a) { return a.length > 0 ? a[0] : null; } exports.first = first; +function and(bools) { + return bools.reduce(function (a, b) { return a && b; }, true); +} +exports.and = and; function merge(m1, m2) { var m = {}; for (var attr in m1) { @@ -52,4 +56,4 @@ function forEach(map, callback) { } } exports.forEach = forEach; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxzQkFBNkIsQ0FBbUIsRUFBRSxDQUFtQjtJQUNuRSxJQUFJLEVBQUUsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3hCLElBQUksRUFBRSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQ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0PFQ+KGE6IFRbXSk6IFQgfCBudWxsIHtcbiAgcmV0dXJuIGEubGVuZ3RoID4gMCA/IGFbMF0gOiBudWxsO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbWVyZ2U8Vj4obTE6IHtba2V5OiBzdHJpbmddOiBWfSwgbTI6IHtba2V5OiBzdHJpbmddOiBWfSk6IHtba2V5OiBzdHJpbmddOiBWfSB7XG4gIHZhciBtOiB7W2tleTogc3RyaW5nXTogVn0gPSB7fTtcblxuICBmb3IgKHZhciBhdHRyIGluIG0xKSB7XG4gICAgaWYgKG0xLmhhc093blByb3BlcnR5KGF0dHIpKSB7XG4gICAgICBtW2F0dHJdID0gbTFbYXR0cl07XG4gICAgfVxuICB9XG5cbiAgZm9yICh2YXIgYXR0ciBpbiBtMikge1xuICAgIGlmIChtMi5oYXNPd25Qcm9wZXJ0eShhdHRyKSkge1xuICAgICAgbVthdHRyXSA9IG0yW2F0dHJdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZm9yRWFjaDxLLCBWPihtYXA6IHtba2V5OiBzdHJpbmddOiBWfSwgY2FsbGJhY2s6IC8qKFYsIEspID0+IHZvaWQqLyBGdW5jdGlvbik6IHZvaWQge1xuICBmb3IgKHZhciBwcm9wIGluIG1hcCkge1xuICAgIGlmIChtYXAuaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgIGNhbGxiYWNrKG1hcFtwcm9wXSwgcHJvcCk7XG4gICAgfVxuICB9XG59Il19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxzQkFBNkIsQ0FBbUIsRUFBRSxDQUFtQj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iB7W2tleTogc3RyaW5nXTogVn0sIGNhbGxiYWNrOiAvKihWLCBLKSA9PiB2b2lkKi8gRnVuY3Rpb24pOiB2b2lkIHtcbiAgZm9yICh2YXIgcHJvcCBpbiBtYXApIHtcbiAgICBpZiAobWFwLmhhc093blByb3BlcnR5KHByb3ApKSB7XG4gICAgICBjYWxsYmFjayhtYXBbcHJvcF0sIHByb3ApO1xuICAgIH1cbiAgfVxufSJdfQ== \ No newline at end of file diff --git a/modules/@angular/router/build/src/utils/tree.d.ts b/modules/@angular/router/build/src/utils/tree.d.ts index 1b025de959..1b28a53874 100644 --- a/modules/@angular/router/build/src/utils/tree.d.ts +++ b/modules/@angular/router/build/src/utils/tree.d.ts @@ -9,7 +9,6 @@ export declare class Tree { pathFromRoot(t: T): T[]; contains(tree: Tree): boolean; } -export declare function rootNode(tree: Tree): TreeNode; export declare class TreeNode { value: T; children: TreeNode[]; diff --git a/modules/@angular/router/build/src/utils/tree.js b/modules/@angular/router/build/src/utils/tree.js index 6121f4b421..3da645f27b 100644 --- a/modules/@angular/router/build/src/utils/tree.js +++ b/modules/@angular/router/build/src/utils/tree.js @@ -32,10 +32,6 @@ var Tree = (function () { return Tree; }()); exports.Tree = Tree; -function rootNode(tree) { - return tree._root; -} -exports.rootNode = rootNode; function findNode(expected, c) { if (expected === c.value) return c; @@ -85,4 +81,4 @@ var TreeNode = (function () { return TreeNode; }()); exports.TreeNode = TreeNode; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy90cmVlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtJQUlFLGNBQVksSUFBaUI7UUFBSSxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQztJQUFDLENBQUM7SUFFckQsc0JBQUksc0JBQUk7YUFBUixjQUFnQixNQUFNLEN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