docs(upgrade): move examples etc into `@usageNotes` (#26039)
PR Close #26039
This commit is contained in:
parent
c08549ae38
commit
fef9cebed0
|
@ -29,6 +29,7 @@ interface Thenable<T> {
|
|||
* This helper function returns a factory function to be used for registering
|
||||
* an AngularJS wrapper directive for "downgrading" an Angular component.
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Examples
|
||||
*
|
||||
* Let's assume that you have an Angular component called `ng2Heroes` that needs
|
||||
|
|
|
@ -20,6 +20,7 @@ import {INJECTOR_KEY} from './constants';
|
|||
* This helper function returns a factory function that provides access to the Angular
|
||||
* service identified by the `token` parameter.
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Examples
|
||||
*
|
||||
* First ensure that the service to be downgraded is provided in an `NgModule`
|
||||
|
|
|
@ -30,7 +30,8 @@ let upgradeCount: number = 0;
|
|||
* 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks
|
||||
* coexisting in a single application.
|
||||
*
|
||||
* ## Mental Model
|
||||
* @usageNotes
|
||||
* ### Mental Model
|
||||
*
|
||||
* When reasoning about how a hybrid application works it is useful to have a mental model which
|
||||
* describes what is happening and explains what is happening at the lowest level.
|
||||
|
@ -134,7 +135,8 @@ export class UpgradeAdapter {
|
|||
* Angular Component. The adapter will bootstrap Angular component from within the
|
||||
* AngularJS template.
|
||||
*
|
||||
* ## Mental Model
|
||||
* @usageNotes
|
||||
* ### Mental Model
|
||||
*
|
||||
* 1. The component is instantiated by being listed in AngularJS template. This means that the
|
||||
* host element is controlled by AngularJS, but the component's view will be controlled by
|
||||
|
@ -146,7 +148,7 @@ export class UpgradeAdapter {
|
|||
* by way of the `ControlValueAccessor` interface from @angular/forms. Only components that
|
||||
* implement this interface are eligible.
|
||||
*
|
||||
* ## Supported Features
|
||||
* ### Supported Features
|
||||
*
|
||||
* - Bindings:
|
||||
* - Attribute: `<comp name="World">`
|
||||
|
@ -199,13 +201,14 @@ export class UpgradeAdapter {
|
|||
* directive. The adapter will bootstrap AngularJS component from within the Angular
|
||||
* template.
|
||||
*
|
||||
* ## Mental Model
|
||||
* @usageNotes
|
||||
* ### Mental Model
|
||||
*
|
||||
* 1. The component is instantiated by being listed in Angular template. This means that the
|
||||
* host element is controlled by Angular, but the component's view will be controlled by
|
||||
* AngularJS.
|
||||
*
|
||||
* ## Supported Features
|
||||
* ### Supported Features
|
||||
*
|
||||
* - Bindings:
|
||||
* - Attribute: `<comp name="World">`
|
||||
|
@ -283,6 +286,7 @@ export class UpgradeAdapter {
|
|||
* Use this instead of `angular.mock.module()` to load the upgrade module into
|
||||
* the AngularJS testing injector.
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
|
@ -339,6 +343,7 @@ export class UpgradeAdapter {
|
|||
* [`bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method. Unlike
|
||||
* AngularJS, this bootstrap is asynchronous.
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
|
@ -412,7 +417,7 @@ export class UpgradeAdapter {
|
|||
/**
|
||||
* Allows AngularJS service to be accessible from Angular.
|
||||
*
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
|
@ -452,7 +457,7 @@ export class UpgradeAdapter {
|
|||
/**
|
||||
* Allows Angular service to be accessible from AngularJS.
|
||||
*
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
|
@ -481,6 +486,7 @@ export class UpgradeAdapter {
|
|||
* @param modules The AngularJS modules that this upgrade module should depend upon.
|
||||
* @returns The AngularJS upgrade module that is declared by this method
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
|
|
|
@ -32,11 +32,12 @@ class Bindings {
|
|||
* A helper class that allows an AngularJS component to be used from Angular.
|
||||
*
|
||||
* *Part of the [upgrade/static](api?query=upgrade%2Fstatic)
|
||||
* library for hybrid upgrade apps that support AoT compilation*
|
||||
* library for hybrid upgrade apps that support AoT compilation.*
|
||||
*
|
||||
* This helper class should be used as a base class for creating Angular directives
|
||||
* that wrap AngularJS components that need to be "upgraded".
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Examples
|
||||
*
|
||||
* Let's assume that you have an AngularJS component called `ng1Hero` that needs
|
||||
|
|
|
@ -90,11 +90,11 @@ import {NgAdapterInjector} from './util';
|
|||
* 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
|
||||
* * Core AngularJS services
|
||||
* Importing this `NgModule` will add providers for the core
|
||||
* [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.
|
||||
*
|
||||
* #### Bootstrap
|
||||
* * 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.
|
||||
|
|
Loading…
Reference in New Issue