docs: add ngmodule api doc (#25618)

PR Close #25618
This commit is contained in:
Judy Bogart
2018-08-22 08:52:19 -07:00
committed by Ben Lesh
parent f91b0455c0
commit dd5e35ee67
6 changed files with 53 additions and 21 deletions

View File

@ -76,7 +76,7 @@ export function jsonpCallbackContext(): Object {
}
/**
* An NgModule that adds XSRF protection support to outgoing requests.
* Configures XSRF protection support for outgoing requests.
*
* For a server that supports a cookie-based XSRF protection system,
* use directly to configure XSRF protection with the correct
@ -132,10 +132,11 @@ export class HttpClientXsrfModule {
}
/**
* An NgModule that provides the `HttpClient` and associated services.
* Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
* with supporting services for XSRF. Automatically imported by `HttpClientModule`.
*
* Interceptors can be added to the chain behind `HttpClient` by binding them
* to the multiprovider for `HTTP_INTERCEPTORS`.
* You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
*
*
*/
@ -150,7 +151,8 @@ export class HttpClientXsrfModule {
}),
],
/**
* The module provides `HttpClient` itself, and supporting services.
* Configures the [dependency injector](guide/glossary#injector) where it is imported
* with supporting services for HTTP communications.
*/
providers: [
HttpClient,
@ -165,10 +167,13 @@ export class HttpClientModule {
}
/**
* An NgModule that enables JSONP support in `HttpClient`.
* Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
* with supporting services for JSONP.
* Without this module, Jsonp requests reach the backend
* with method JSONP, where they are rejected.
*
* Without this module, Jsonp requests will reach the backend
* with method JSONP, where they'll be rejected.
* You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
*
*
*/

View File

@ -16,8 +16,15 @@ import {COMMON_PIPES} from './pipes/index';
// Note: This does not contain the location providers,
// as they need some platform specific implementations to work.
/**
* The module that includes all the basic Angular directives like {@link NgIf}, {@link NgForOf}, ...
* Exports all the basic Angular directives and pipes,
* such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.
* Re-exported by `BrowserModule`, which is included automatically in the root
* `AppModule` when you create a new app with the CLI `new` command.
*
* * The `providers` options configure the NgModule's injector to provide
* localization dependencies to members.
* * The `exports` options make the declared directives and pipes available for import
* by other NgModules.
*
*/
@NgModule({