2016-05-02 13:11:21 -04:00
|
|
|
/**
|
|
|
|
* @module
|
|
|
|
* @description
|
2016-05-03 14:35:07 -04:00
|
|
|
* Maps application URLs into application states, to support deep-linking and navigation.
|
2016-05-02 13:11:21 -04:00
|
|
|
*/
|
|
|
|
|
2016-05-02 13:36:58 -04:00
|
|
|
export {Router, RouterOutletMap} from './src/router';
|
|
|
|
export {RouteSegment, UrlSegment, Tree, UrlTree, RouteTree} from './src/segments';
|
|
|
|
export {Routes} from './src/metadata/decorators';
|
|
|
|
export {Route} from './src/metadata/metadata';
|
|
|
|
export {RouterUrlSerializer, DefaultRouterUrlSerializer} from './src/router_url_serializer';
|
|
|
|
export {OnActivate, CanDeactivate} from './src/interfaces';
|
|
|
|
export {ROUTER_PROVIDERS} from './src/router_providers';
|
2016-05-02 13:11:21 -04:00
|
|
|
|
2016-05-02 13:36:58 -04:00
|
|
|
import {RouterOutlet} from './src/directives/router_outlet';
|
|
|
|
import {RouterLink} from './src/directives/router_link';
|
2016-05-02 13:11:21 -04:00
|
|
|
|
2016-05-03 14:35:07 -04:00
|
|
|
/**
|
|
|
|
* 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';
|
2016-05-20 13:00:04 -04:00
|
|
|
* import {ROUTER_DIRECTIVES, Routes} from '@angular/router';
|
2016-05-03 14:35:07 -04:00
|
|
|
*
|
|
|
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
2016-05-20 13:00:04 -04:00
|
|
|
* @Routes([
|
2016-05-03 14:35:07 -04:00
|
|
|
* {...},
|
|
|
|
* ])
|
|
|
|
* class AppCmp {
|
|
|
|
* // ...
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* bootstrap(AppCmp);
|
|
|
|
* ```
|
|
|
|
*/
|
2016-05-02 13:11:21 -04:00
|
|
|
export const ROUTER_DIRECTIVES: any[] = /*@ts2dart_const*/[RouterOutlet, RouterLink];
|