doc: add some API doc

Closes #4060
This commit is contained in:
Victor Berchet
2015-09-03 16:17:23 -07:00
parent 5e013c4aef
commit 998c7c2e03
9 changed files with 164 additions and 33 deletions

View File

@ -38,6 +38,28 @@ import {CONST_EXPR} from './src/core/facade/lang';
export const ROUTER_DIRECTIVES: any[] = CONST_EXPR([RouterOutlet, RouterLink]);
/**
* A list of {@link Binding}. To use the router, you must add this to your application.
*
* ## Example
*
* ```typescript
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* new Route(...),
* ])
* class AppCmp {
* constructor(router: Router, location: Location) {
* // ...
* }
*
* }
*
*
* bootstrap(AppCmp, [ROUTER_BINDINGS]);
* ```
*/
export const ROUTER_BINDINGS: any[] = CONST_EXPR([
RouteRegistry,
Pipeline,