mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
30 lines
783 B
TypeScript
30 lines
783 B
TypeScript
import {ROUTER_PROVIDERS_COMMON} from './router_providers_common';
|
|
import {BrowserPlatformLocation} from '@angular/platform-browser';
|
|
import {PlatformLocation} from '@angular/common';
|
|
|
|
/**
|
|
* 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]);
|
|
* ```
|
|
*/
|
|
export const ROUTER_PROVIDERS: any[] = /*@ts2dart_const*/[
|
|
ROUTER_PROVIDERS_COMMON,
|
|
/*@ts2dart_Provider*/ {provide: PlatformLocation, useClass: BrowserPlatformLocation},
|
|
];
|