@angular/router
Advanced tools
Comparing version 0.0.0-4 to 0.0.0-5
/** | ||
* @module | ||
* @description | ||
* Maps application URLs into application states, to support deep-linking and navigation. | ||
*/ | ||
* @module | ||
* @description | ||
* Maps application URLs into application states, to support deep-linking and navigation. | ||
*/ | ||
export { Router } from './src/router'; | ||
@@ -7,0 +7,0 @@ export { RouterOutlet } from './src/directives/router_outlet'; |
@@ -1,10 +0,1 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
import { Directive } from '@angular/core'; | ||
@@ -14,32 +5,3 @@ import { Location } from '@angular/common'; | ||
import { Router } from '../router'; | ||
/** | ||
* The RouterLink directive lets you link to specific parts of your app. | ||
* | ||
* Consider the following route configuration: | ||
* ``` | ||
* @RouteConfig([ | ||
* { path: '/user', component: UserCmp, as: 'User' } | ||
* ]); | ||
* class MyComp {} | ||
* ``` | ||
* | ||
* When linking to this `User` route, you can write: | ||
* | ||
* ``` | ||
* <a [routerLink]="['./User']">link to user component</a> | ||
* ``` | ||
* | ||
* RouterLink expects the value to be an array of route names, followed by the params | ||
* for that level of routing. For instance `['/Team', {teamId: 1}, 'User', {userId: 2}]` | ||
* means that we want to generate a link for the `Team` route with params `{teamId: 1}`, | ||
* and with a child route `User` with params `{userId: 2}`. | ||
* | ||
* The first route name should be prepended with `/`, `./`, or `../`. | ||
* If the route begins with `/`, the router will look up the route from the root of the app. | ||
* If the route begins with `./`, the router will instead look in the current component's | ||
* children for the route. And if the route begins with `../`, the router will look at the | ||
* current component's parent. | ||
*/ | ||
export let RouterLink = class RouterLink { | ||
export class RouterLink { | ||
constructor(_router, _location) { | ||
@@ -71,15 +33,18 @@ this._router = _router; | ||
} | ||
}; | ||
RouterLink = __decorate([ | ||
Directive({ | ||
selector: '[routerLink]', | ||
inputs: ['routeParams: routerLink', 'target: target'], | ||
host: { | ||
'(click)': 'onClick()', | ||
'[attr.href]': 'visibleHref', | ||
'[class.router-link-active]': 'isRouteActive' | ||
} | ||
}), | ||
__metadata('design:paramtypes', [Router, Location]) | ||
], RouterLink); | ||
} | ||
RouterLink.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[routerLink]', | ||
inputs: ['routeParams: routerLink', 'target: target'], | ||
host: { | ||
'(click)': 'onClick()', | ||
'[attr.href]': 'visibleHref', | ||
'[class.router-link-active]': 'isRouteActive' | ||
} | ||
},] }, | ||
]; | ||
RouterLink.ctorParameters = [ | ||
{ type: Router, }, | ||
{ type: Location, }, | ||
]; | ||
//# sourceMappingURL=router_link.js.map |
@@ -1,13 +0,1 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
import { PromiseWrapper, EventEmitter } from '../../src/facade/async'; | ||
@@ -22,12 +10,3 @@ import { StringMapWrapper } from '../../src/facade/collection'; | ||
let _resolveToTrue = PromiseWrapper.resolve(true); | ||
/** | ||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route. | ||
* | ||
* ## Use | ||
* | ||
* ``` | ||
* <router-outlet></router-outlet> | ||
* ``` | ||
*/ | ||
export let RouterOutlet = class RouterOutlet { | ||
export class RouterOutlet { | ||
constructor(_viewContainerRef, _loader, _parentRouter, nameAttr) { | ||
@@ -161,12 +140,15 @@ this._viewContainerRef = _viewContainerRef; | ||
ngOnDestroy() { this._parentRouter.unregisterPrimaryOutlet(this); } | ||
} | ||
RouterOutlet.decorators = [ | ||
{ type: Directive, args: [{ selector: 'router-outlet' },] }, | ||
]; | ||
RouterOutlet.ctorParameters = [ | ||
{ type: ViewContainerRef, }, | ||
{ type: DynamicComponentLoader, }, | ||
{ type: routerMod.Router, }, | ||
{ type: undefined, decorators: [{ type: Attribute, args: ['name',] },] }, | ||
]; | ||
RouterOutlet.propDecorators = { | ||
'activateEvents': [{ type: Output, args: ['activate',] },], | ||
}; | ||
__decorate([ | ||
Output('activate'), | ||
__metadata('design:type', Object) | ||
], RouterOutlet.prototype, "activateEvents", void 0); | ||
RouterOutlet = __decorate([ | ||
Directive({ selector: 'router-outlet' }), | ||
__param(3, Attribute('name')), | ||
__metadata('design:paramtypes', [ViewContainerRef, DynamicComponentLoader, routerMod.Router, String]) | ||
], RouterOutlet); | ||
//# sourceMappingURL=router_outlet.js.map |
/** | ||
* A base class for the WrappedException that can be used to identify | ||
* a WrappedException from ExceptionHandler without adding circular | ||
* dependency. | ||
*/ | ||
* A base class for the WrappedException that can be used to identify | ||
* a WrappedException from ExceptionHandler without adding circular | ||
* dependency. | ||
*/ | ||
export class BaseWrappedException extends Error { | ||
@@ -7,0 +7,0 @@ constructor(message) { |
@@ -1,5 +0,1 @@ | ||
/** | ||
* This indirection is needed to free up Component, etc symbols in the public API | ||
* to be used by the decorator versions of these annotations. | ||
*/ | ||
import { makeDecorator } from '../../core_private'; | ||
@@ -6,0 +2,0 @@ import { CanActivate as CanActivateAnnotation } from './lifecycle_annotations_impl'; |
@@ -1,13 +0,1 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
import { ListWrapper, Map, StringMapWrapper } from '../src/facade/collection'; | ||
@@ -61,8 +49,3 @@ import { PromiseWrapper } from '../src/facade/async'; | ||
/*@ts2dart_const*/ new OpaqueToken('RouterPrimaryComponent'); | ||
/** | ||
* The RouteRegistry holds route configurations for each component in an Angular app. | ||
* It is responsible for creating Instructions from URLs, and generating URLs based on route and | ||
* parameters. | ||
*/ | ||
export let RouteRegistry = class RouteRegistry { | ||
export class RouteRegistry { | ||
constructor(_rootComponent) { | ||
@@ -382,8 +365,9 @@ this._rootComponent = _rootComponent; | ||
} | ||
}; | ||
RouteRegistry = __decorate([ | ||
Injectable(), | ||
__param(0, Inject(ROUTER_PRIMARY_COMPONENT)), | ||
__metadata('design:paramtypes', [Type]) | ||
], RouteRegistry); | ||
} | ||
RouteRegistry.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
RouteRegistry.ctorParameters = [ | ||
{ type: Type, decorators: [{ type: Inject, args: [ROUTER_PRIMARY_COMPONENT,] },] }, | ||
]; | ||
/* | ||
@@ -390,0 +374,0 @@ * Given: ['/a/b', {c: 2}] |
@@ -1,13 +0,1 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
import { PromiseWrapper, EventEmitter, ObservableWrapper } from '../src/facade/async'; | ||
@@ -23,20 +11,3 @@ import { Map, StringMapWrapper } from '../src/facade/collection'; | ||
let _resolveToFalse = PromiseWrapper.resolve(false); | ||
/** | ||
* The `Router` is responsible for mapping URLs to components. | ||
* | ||
* You can see the state of the router by inspecting the read-only field `router.navigating`. | ||
* This may be useful for showing a spinner, for instance. | ||
* | ||
* ## Concepts | ||
* | ||
* Routers and component instances have a 1:1 correspondence. | ||
* | ||
* The router holds reference to a number of {@link RouterOutlet}. | ||
* An outlet is a placeholder that the router dynamically fills in depending on the current URL. | ||
* | ||
* When the router navigates from a URL, it must first recognize it and serialize it into an | ||
* `Instruction`. | ||
* The router uses the `RouteRegistry` to get an `Instruction`. | ||
*/ | ||
export let Router = class Router { | ||
export class Router { | ||
constructor(registry, parent, hostComponent, root) { | ||
@@ -403,8 +374,13 @@ this.registry = registry; | ||
} | ||
}; | ||
Router = __decorate([ | ||
Injectable(), | ||
__metadata('design:paramtypes', [RouteRegistry, Router, Object, Router]) | ||
], Router); | ||
export let RootRouter = class RootRouter extends Router { | ||
} | ||
Router.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
Router.ctorParameters = [ | ||
{ type: RouteRegistry, }, | ||
{ type: Router, }, | ||
null, | ||
{ type: Router, }, | ||
]; | ||
export class RootRouter extends Router { | ||
constructor(registry, location, primaryComponent) { | ||
@@ -473,8 +449,11 @@ super(registry, null, primaryComponent); | ||
} | ||
}; | ||
RootRouter = __decorate([ | ||
Injectable(), | ||
__param(2, Inject(ROUTER_PRIMARY_COMPONENT)), | ||
__metadata('design:paramtypes', [RouteRegistry, Location, Type]) | ||
], RootRouter); | ||
} | ||
RootRouter.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
RootRouter.ctorParameters = [ | ||
{ type: RouteRegistry, }, | ||
{ type: Location, }, | ||
{ type: Type, decorators: [{ type: Inject, args: [ROUTER_PRIMARY_COMPONENT,] },] }, | ||
]; | ||
class ChildRouter extends Router { | ||
@@ -481,0 +460,0 @@ constructor(parent, hostComponent) { |
{ | ||
"name": "@angular/router", | ||
"version": "0.0.0-4", | ||
"version": "0.0.0-5", | ||
"description": "", | ||
@@ -11,6 +11,6 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"@angular/core": "0.0.0-4", | ||
"@angular/common": "0.0.0-4", | ||
"@angular/platform-browser": "0.0.0-4" | ||
"@angular/core": "0.0.0-5", | ||
"@angular/common": "0.0.0-5", | ||
"@angular/platform-browser": "0.0.0-5" | ||
} | ||
} |
@@ -1,6 +0,1 @@ | ||
/** | ||
* @module | ||
* @description | ||
* Maps application URLs into application states, to support deep-linking and navigation. | ||
*/ | ||
"use strict"; | ||
@@ -10,2 +5,7 @@ function __export(m) { | ||
} | ||
/** | ||
* @module | ||
* @description | ||
* Maps application URLs into application states, to support deep-linking and navigation. | ||
*/ | ||
var router_1 = require('./src/router'); | ||
@@ -12,0 +12,0 @@ exports.Router = router_1.Router; |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require('@angular/core'); | ||
@@ -15,31 +6,2 @@ var common_1 = require('@angular/common'); | ||
var router_1 = require('../router'); | ||
/** | ||
* The RouterLink directive lets you link to specific parts of your app. | ||
* | ||
* Consider the following route configuration: | ||
* ``` | ||
* @RouteConfig([ | ||
* { path: '/user', component: UserCmp, as: 'User' } | ||
* ]); | ||
* class MyComp {} | ||
* ``` | ||
* | ||
* When linking to this `User` route, you can write: | ||
* | ||
* ``` | ||
* <a [routerLink]="['./User']">link to user component</a> | ||
* ``` | ||
* | ||
* RouterLink expects the value to be an array of route names, followed by the params | ||
* for that level of routing. For instance `['/Team', {teamId: 1}, 'User', {userId: 2}]` | ||
* means that we want to generate a link for the `Team` route with params `{teamId: 1}`, | ||
* and with a child route `User` with params `{userId: 2}`. | ||
* | ||
* The first route name should be prepended with `/`, `./`, or `../`. | ||
* If the route begins with `/`, the router will look up the route from the root of the app. | ||
* If the route begins with `./`, the router will instead look in the current component's | ||
* children for the route. And if the route begins with `../`, the router will look at the | ||
* current component's parent. | ||
*/ | ||
var RouterLink = (function () { | ||
@@ -81,14 +43,17 @@ function RouterLink(_router, _location) { | ||
}; | ||
RouterLink = __decorate([ | ||
core_1.Directive({ | ||
selector: '[routerLink]', | ||
inputs: ['routeParams: routerLink', 'target: target'], | ||
host: { | ||
'(click)': 'onClick()', | ||
'[attr.href]': 'visibleHref', | ||
'[class.router-link-active]': 'isRouteActive' | ||
} | ||
}), | ||
__metadata('design:paramtypes', [router_1.Router, common_1.Location]) | ||
], RouterLink); | ||
RouterLink.decorators = [ | ||
{ type: core_1.Directive, args: [{ | ||
selector: '[routerLink]', | ||
inputs: ['routeParams: routerLink', 'target: target'], | ||
host: { | ||
'(click)': 'onClick()', | ||
'[attr.href]': 'visibleHref', | ||
'[class.router-link-active]': 'isRouteActive' | ||
} | ||
},] }, | ||
]; | ||
RouterLink.ctorParameters = [ | ||
{ type: router_1.Router, }, | ||
{ type: common_1.Location, }, | ||
]; | ||
return RouterLink; | ||
@@ -95,0 +60,0 @@ }()); |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
var async_1 = require('../../src/facade/async'); | ||
@@ -23,11 +11,2 @@ var collection_1 = require('../../src/facade/collection'); | ||
var _resolveToTrue = async_1.PromiseWrapper.resolve(true); | ||
/** | ||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route. | ||
* | ||
* ## Use | ||
* | ||
* ``` | ||
* <router-outlet></router-outlet> | ||
* ``` | ||
*/ | ||
var RouterOutlet = (function () { | ||
@@ -176,11 +155,14 @@ function RouterOutlet(_viewContainerRef, _loader, _parentRouter, nameAttr) { | ||
RouterOutlet.prototype.ngOnDestroy = function () { this._parentRouter.unregisterPrimaryOutlet(this); }; | ||
__decorate([ | ||
core_1.Output('activate'), | ||
__metadata('design:type', Object) | ||
], RouterOutlet.prototype, "activateEvents", void 0); | ||
RouterOutlet = __decorate([ | ||
core_1.Directive({ selector: 'router-outlet' }), | ||
__param(3, core_1.Attribute('name')), | ||
__metadata('design:paramtypes', [core_1.ViewContainerRef, core_1.DynamicComponentLoader, routerMod.Router, String]) | ||
], RouterOutlet); | ||
RouterOutlet.decorators = [ | ||
{ type: core_1.Directive, args: [{ selector: 'router-outlet' },] }, | ||
]; | ||
RouterOutlet.ctorParameters = [ | ||
{ type: core_1.ViewContainerRef, }, | ||
{ type: core_1.DynamicComponentLoader, }, | ||
{ type: routerMod.Router, }, | ||
{ type: undefined, decorators: [{ type: core_1.Attribute, args: ['name',] },] }, | ||
]; | ||
RouterOutlet.propDecorators = { | ||
'activateEvents': [{ type: core_1.Output, args: ['activate',] },], | ||
}; | ||
return RouterOutlet; | ||
@@ -187,0 +169,0 @@ }()); |
@@ -8,6 +8,6 @@ "use strict"; | ||
/** | ||
* A base class for the WrappedException that can be used to identify | ||
* a WrappedException from ExceptionHandler without adding circular | ||
* dependency. | ||
*/ | ||
* A base class for the WrappedException that can be used to identify | ||
* a WrappedException from ExceptionHandler without adding circular | ||
* dependency. | ||
*/ | ||
var BaseWrappedException = (function (_super) { | ||
@@ -14,0 +14,0 @@ __extends(BaseWrappedException, _super); |
@@ -0,6 +1,6 @@ | ||
"use strict"; | ||
/** | ||
* This indirection is needed to free up Component, etc symbols in the public API | ||
* to be used by the decorator versions of these annotations. | ||
*/ | ||
"use strict"; | ||
* This indirection is needed to free up Component, etc symbols in the public API | ||
* to be used by the decorator versions of these annotations. | ||
*/ | ||
var core_private_1 = require('../../core_private'); | ||
@@ -7,0 +7,0 @@ var lifecycle_annotations_impl_1 = require('./lifecycle_annotations_impl'); |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
var collection_1 = require('../src/facade/collection'); | ||
@@ -62,7 +50,2 @@ var async_1 = require('../src/facade/async'); | ||
/*@ts2dart_const*/ new core_1.OpaqueToken('RouterPrimaryComponent'); | ||
/** | ||
* The RouteRegistry holds route configurations for each component in an Angular app. | ||
* It is responsible for creating Instructions from URLs, and generating URLs based on route and | ||
* parameters. | ||
*/ | ||
var RouteRegistry = (function () { | ||
@@ -391,7 +374,8 @@ function RouteRegistry(_rootComponent) { | ||
}; | ||
RouteRegistry = __decorate([ | ||
core_1.Injectable(), | ||
__param(0, core_1.Inject(exports.ROUTER_PRIMARY_COMPONENT)), | ||
__metadata('design:paramtypes', [lang_1.Type]) | ||
], RouteRegistry); | ||
RouteRegistry.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
RouteRegistry.ctorParameters = [ | ||
{ type: lang_1.Type, decorators: [{ type: core_1.Inject, args: [exports.ROUTER_PRIMARY_COMPONENT,] },] }, | ||
]; | ||
return RouteRegistry; | ||
@@ -398,0 +382,0 @@ }()); |
@@ -7,14 +7,2 @@ "use strict"; | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
var async_1 = require('../src/facade/async'); | ||
@@ -30,19 +18,2 @@ var collection_1 = require('../src/facade/collection'); | ||
var _resolveToFalse = async_1.PromiseWrapper.resolve(false); | ||
/** | ||
* The `Router` is responsible for mapping URLs to components. | ||
* | ||
* You can see the state of the router by inspecting the read-only field `router.navigating`. | ||
* This may be useful for showing a spinner, for instance. | ||
* | ||
* ## Concepts | ||
* | ||
* Routers and component instances have a 1:1 correspondence. | ||
* | ||
* The router holds reference to a number of {@link RouterOutlet}. | ||
* An outlet is a placeholder that the router dynamically fills in depending on the current URL. | ||
* | ||
* When the router navigates from a URL, it must first recognize it and serialize it into an | ||
* `Instruction`. | ||
* The router uses the `RouteRegistry` to get an `Instruction`. | ||
*/ | ||
var Router = (function () { | ||
@@ -424,6 +395,11 @@ function Router(registry, parent, hostComponent, root) { | ||
}; | ||
Router = __decorate([ | ||
core_1.Injectable(), | ||
__metadata('design:paramtypes', [route_registry_1.RouteRegistry, Router, Object, Router]) | ||
], Router); | ||
Router.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
Router.ctorParameters = [ | ||
{ type: route_registry_1.RouteRegistry, }, | ||
{ type: Router, }, | ||
null, | ||
{ type: Router, }, | ||
]; | ||
return Router; | ||
@@ -500,7 +476,10 @@ }()); | ||
}; | ||
RootRouter = __decorate([ | ||
core_1.Injectable(), | ||
__param(2, core_1.Inject(route_registry_1.ROUTER_PRIMARY_COMPONENT)), | ||
__metadata('design:paramtypes', [route_registry_1.RouteRegistry, common_1.Location, lang_1.Type]) | ||
], RootRouter); | ||
RootRouter.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
RootRouter.ctorParameters = [ | ||
{ type: route_registry_1.RouteRegistry, }, | ||
{ type: common_1.Location, }, | ||
{ type: lang_1.Type, decorators: [{ type: core_1.Inject, args: [route_registry_1.ROUTER_PRIMARY_COMPONENT,] },] }, | ||
]; | ||
return RootRouter; | ||
@@ -507,0 +486,0 @@ }(Router)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249
1107878
14819