diff --git a/packages/upgrade/src/common/downgrade_component.ts b/packages/upgrade/src/common/downgrade_component.ts index a6d736582c..ec1070b13f 100644 --- a/packages/upgrade/src/common/downgrade_component.ts +++ b/packages/upgrade/src/common/downgrade_component.ts @@ -26,7 +26,16 @@ interface Thenable { * * 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`: 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 { * * {@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`: The type of the Component that will be downgraded - * * @experimental */ export function downgradeComponent(info: { diff --git a/packages/upgrade/src/common/downgrade_injectable.ts b/packages/upgrade/src/common/downgrade_injectable.ts index e9894e36fb..73e0c0a8b9 100644 --- a/packages/upgrade/src/common/downgrade_injectable.ts +++ b/packages/upgrade/src/common/downgrade_injectable.ts @@ -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 { diff --git a/packages/upgrade/src/static/upgrade_component.ts b/packages/upgrade/src/static/upgrade_component.ts index 5a670b15ff..d7cb80673d 100644 --- a/packages/upgrade/src/static/upgrade_component.ts +++ b/packages/upgrade/src/static/upgrade_component.ts @@ -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 { diff --git a/packages/upgrade/src/static/upgrade_module.ts b/packages/upgrade/src/static/upgrade_module.ts index 7eb21efa3a..0448fad6ab 100644 --- a/packages/upgrade/src/static/upgrade_module.ts +++ b/packages/upgrade/src/static/upgrade_module.ts @@ -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]})