docs: add di-related api doc (#27731)

PR Close #27731
This commit is contained in:
Judy Bogart
2018-07-23 17:11:30 -07:00
committed by Miško Hevery
parent f8b9e61469
commit 644e7a28d8
5 changed files with 150 additions and 74 deletions

View File

@ -40,16 +40,15 @@ export abstract class LocationStrategy {
/**
* The `APP_BASE_HREF` token represents the base href to be used with the
* {@link PathLocationStrategy}.
*
* If you're using {@link PathLocationStrategy}, you must provide a provider to a string
* representing the URL prefix that should be preserved when generating and recognizing
* URLs.
* A predefined [DI token](guide/glossary#di-token) for the base href
* to be used with the `PathLocationStrategy`.
* The base href is the URL prefix that should be preserved when generating
* and recognizing URLs.
*
* @usageNotes
*
* ### Example
* The following example shows how to use this token to configure the root app injector
* with a base href value, so that the DI framework can supply the dependency anywhere in the app.
*
* ```typescript
* import {Component, NgModule} from '@angular/core';