Template Upload
This commit is contained in:
35
node_modules/angular2/ts/router/router_link_dsl.ts
generated
vendored
Normal file
35
node_modules/angular2/ts/router/router_link_dsl.ts
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
import {TEMPLATE_TRANSFORMS} from 'angular2/compiler';
|
||||
import {Provider} from 'angular2/core';
|
||||
import {RouterLinkTransform} from 'angular2/src/router/directives/router_link_transform';
|
||||
import {CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
|
||||
export {RouterLinkTransform} from 'angular2/src/router/directives/router_link_transform';
|
||||
|
||||
/**
|
||||
* Enables the router link DSL.
|
||||
*
|
||||
* Warning. This feature is experimental and can change.
|
||||
*
|
||||
* To enable the transformer pass the router link DSL provider to `bootstrap`.
|
||||
*
|
||||
* ## Example:
|
||||
* ```
|
||||
* import {bootstrap} from 'angular2/platform/browser';
|
||||
* import {ROUTER_LINK_DSL_PROVIDER} from 'angular2/router/router_link_dsl';
|
||||
*
|
||||
* bootstrap(CustomApp, [ROUTER_LINK_DSL_PROVIDER]);
|
||||
* ```
|
||||
*
|
||||
* The DSL allows you to express router links as follows:
|
||||
* ```
|
||||
* <a [routerLink]="route:User"> <!-- Same as <a [routerLink]="['User']"> -->
|
||||
* <a [routerLink]="route:/User"> <!-- Same as <a [routerLink]="['User']"> -->
|
||||
* <a [routerLink]="route:./User"> <!-- Same as <a [routerLink]="['./User']"> -->
|
||||
* <a [routerLink]="./User(id: value, name: 'Bob')"> <!-- Same as <a [routerLink]="['./User', {id:
|
||||
* value, name: 'Bob'}]"> -->
|
||||
* <a [routerLink]="/User/Modal"> <!-- Same as <a [routerLink]="['/User', 'Modal']"> -->
|
||||
* <a [routerLink]="User[Modal]"> <!-- Same as <a [routerLink]="['User', ['Modal']]"> -->
|
||||
* ```
|
||||
*/
|
||||
export const ROUTER_LINK_DSL_PROVIDER =
|
||||
CONST_EXPR(new Provider(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true}));
|
2
node_modules/angular2/ts/router/testing.ts
generated
vendored
Normal file
2
node_modules/angular2/ts/router/testing.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export * from 'angular2/src/mock/mock_location_strategy';
|
||||
export * from 'angular2/src/mock/location_mock';
|
Reference in New Issue
Block a user