docs(router): add api docs

This commit is contained in:
vsavkin
2016-05-03 11:35:07 -07:00
parent 9f784dcc5a
commit b98c9e74e1
13 changed files with 272 additions and 14 deletions

View File

@ -1,7 +1,7 @@
/**
* @module
* @description
* Alternative implementation of the router. Experimental.
* Maps application URLs into application states, to support deep-linking and navigation.
*/
export {Router, RouterOutletMap} from './src/router';
@ -15,4 +15,24 @@ export {ROUTER_PROVIDERS} from './src/router_providers';
import {RouterOutlet} from './src/directives/router_outlet';
import {RouterLink} from './src/directives/router_link';
/**
* A list of directives. To use the router directives like {@link RouterOutlet} and
* {@link RouterLink}, add this to your `directives` array in the {@link View} decorator of your
* component.
*
* ```
* import {Component} from '@angular/core';
* import {ROUTER_DIRECTIVES, Routes} from '@angular/router-deprecated';
*
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])
* class AppCmp {
* // ...
* }
*
* bootstrap(AppCmp);
* ```
*/
export const ROUTER_DIRECTIVES: any[] = /*@ts2dart_const*/[RouterOutlet, RouterLink];