2016-02-25 12:04:59 -08:00
|
|
|
import {ROUTER_PROVIDERS_COMMON} from './router_providers_common';
|
2016-04-28 17:50:03 -07:00
|
|
|
import {BrowserPlatformLocation} from '@angular/platform-browser';
|
|
|
|
|
import {PlatformLocation} from '@angular/common';
|
2016-01-21 09:58:28 -08:00
|
|
|
|
2016-05-03 11:35:07 -07:00
|
|
|
/**
|
|
|
|
|
* A list of {@link Provider}s. To use the router, you must add this to your application.
|
|
|
|
|
*
|
|
|
|
|
* ```
|
|
|
|
|
* import {Component} from '@angular/core';
|
|
|
|
|
* import {
|
|
|
|
|
* ROUTER_DIRECTIVES,
|
|
|
|
|
* ROUTER_PROVIDERS,
|
|
|
|
|
* Routes
|
|
|
|
|
* } from '@angular/router';
|
|
|
|
|
*
|
|
|
|
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
|
|
|
|
* @Routes([
|
|
|
|
|
* {...},
|
|
|
|
|
* ])
|
|
|
|
|
* class AppCmp {
|
|
|
|
|
* // ...
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* bootstrap(AppCmp, [ROUTER_PROVIDERS]);
|
|
|
|
|
* ```
|
|
|
|
|
*/
|
2016-04-25 21:47:33 -07:00
|
|
|
export const ROUTER_PROVIDERS: any[] = /*@ts2dart_const*/[
|
2016-01-21 09:58:28 -08:00
|
|
|
ROUTER_PROVIDERS_COMMON,
|
2016-05-02 17:11:21 +00:00
|
|
|
/*@ts2dart_Provider*/ {provide: PlatformLocation, useClass: BrowserPlatformLocation},
|
2016-04-25 21:47:33 -07:00
|
|
|
];
|