docs(upgrade): migrate deprecated `@howToUse` tags (#23197)

These have become examples in the `@description` tag.

PR Close #23197
This commit is contained in:
Pete Bacon Darwin 2018-04-05 16:16:20 +01:00 committed by Igor Minar
parent 9141424ac6
commit 5dc50e4688
4 changed files with 46 additions and 46 deletions

View File

@ -26,7 +26,16 @@ interface Thenable<T> {
*
* Allows an Angular component to be used from AngularJS.
*
* @howToUse
* @description
*
* A helper function that returns a factory function to be used for registering an
* AngularJS wrapper directive for "downgrading" an Angular component.
*
* The parameter contains information about the Component that is being downgraded:
*
* * `component: Type<any>`: The type of the Component that will be downgraded
*
* ### Examples
*
* Let's assume that you have an Angular component called `ng2Heroes` that needs
* to be made available in AngularJS templates.
@ -40,15 +49,6 @@ interface Thenable<T> {
*
* {@example upgrade/static/ts/module.ts region="ng2-heroes-wrapper"}
*
* @description
*
* A helper function that returns a factory function to be used for registering an
* AngularJS wrapper directive for "downgrading" an Angular component.
*
* The parameter contains information about the Component that is being downgraded:
*
* * `component: Type<any>`: The type of the Component that will be downgraded
*
* @experimental
*/
export function downgradeComponent(info: {

View File

@ -17,7 +17,17 @@ import {INJECTOR_KEY} from './constants';
*
* Allow an Angular service to be accessible from AngularJS.
*
* @howToUse
* @description
*
* Takes a `token` that identifies a service provided from Angular.
*
* Returns a [factory function](https://docs.angularjs.org/guide/di) that can be
* used to register the service on an AngularJS module.
*
* The factory function provides access to the Angular service that
* is identified by the `token` parameter.
*
* ### Examples
*
* First ensure that the service to be downgraded is provided in an {@link NgModule}
* that will be part of the upgrade application. For example, let's assume we have
@ -39,16 +49,6 @@ import {INJECTOR_KEY} from './constants';
*
* {@example upgrade/static/ts/module.ts region="example-app"}
*
* @description
*
* Takes a `token` that identifies a service provided from Angular.
*
* Returns a [factory function](https://docs.angularjs.org/guide/di) that can be
* used to register the service on an AngularJS module.
*
* The factory function provides access to the Angular service that
* is identified by the `token` parameter.
*
* @experimental
*/
export function downgradeInjectable(token: any): Function {

View File

@ -34,7 +34,12 @@ class Bindings {
*
* Allows an AngularJS component to be used from Angular.
*
* @howToUse
* @description
*
* A helper class that should be used as a base class for creating Angular directives
* that wrap AngularJS components that need to be "upgraded".
*
* ### Examples
*
* Let's assume that you have an AngularJS component called `ng1Hero` that needs
* to be made available in Angular templates.
@ -59,11 +64,6 @@ class Bindings {
* * the AngularJS name of the component (`ng1Hero`)
* * the {@link ElementRef} and {@link Injector} for the component wrapper
*
* @description
*
* A helper class that should be used as a base class for creating Angular directives
* that wrap AngularJS components that need to be "upgraded".
*
* @experimental
*/
export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {

View File

@ -74,7 +74,25 @@ import {NgAdapterInjector} from './util';
* to
* `$apply()`.
*
* @howToUse
* @description
*
* This class is an `NgModule`, which you import to provide AngularJS core services,
* and has an instance method used to bootstrap the hybrid upgrade application.
*
* ## Core AngularJS services
* Importing this {@link NgModule} will add providers for the core
* [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.
*
* ## Bootstrap
* The runtime instance of this class contains a {@link UpgradeModule#bootstrap `bootstrap()`}
* method, which you use to bootstrap the top level AngularJS module onto an element in the
* DOM for the hybrid upgrade app.
*
* It also contains properties to access the {@link UpgradeModule#injector root injector}, the
* bootstrap {@link NgZone} and the
* [AngularJS $injector](https://docs.angularjs.org/api/auto/service/$injector).
*
* ### Examples
*
* `import {UpgradeModule} from '@angular/upgrade/static';`
*
@ -110,24 +128,6 @@ import {NgAdapterInjector} from './util';
*
* {@example upgrade/static/ts/module.ts region="use-ng1-upgraded-service"}
*
* @description
*
* This class is an `NgModule`, which you import to provide AngularJS core services,
* and has an instance method used to bootstrap the hybrid upgrade application.
*
* ## Core AngularJS services
* Importing this {@link NgModule} will add providers for the core
* [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.
*
* ## Bootstrap
* The runtime instance of this class contains a {@link UpgradeModule#bootstrap `bootstrap()`}
* method, which you use to bootstrap the top level AngularJS module onto an element in the
* DOM for the hybrid upgrade app.
*
* It also contains properties to access the {@link UpgradeModule#injector root injector}, the
* bootstrap {@link NgZone} and the
* [AngularJS $injector](https://docs.angularjs.org/api/auto/service/$injector).
*
* @experimental
*/
@NgModule({providers: [angular1Providers]})