Skip to content

Commit cb69656

Browse files
petebacondarwinvicb
authored andcommitted
docs(upgrade/upgrade_adapter): fix up references to AngularJS and Angular 2
1 parent 2fc0560 commit cb69656

1 file changed

Lines changed: 38 additions & 38 deletions

File tree

modules/@angular/upgrade/src/upgrade_adapter.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import {Deferred, controllerKey, getAttributesAsArray, onError} from './util';
2020
let upgradeCount: number = 0;
2121

2222
/**
23-
* Use `UpgradeAdapter` to allow AngularJS v1 and Angular v2 to coexist in a single application.
23+
* Use `UpgradeAdapter` to allow Angular 1 and Angular 2+ to coexist in a single application.
2424
*
2525
* The `UpgradeAdapter` allows:
26-
* 1. creation of Angular v2 component from AngularJS v1 component directive
26+
* 1. creation of Angular 2+ component from Angular 1 component directive
2727
* (See [UpgradeAdapter#upgradeNg1Component()])
28-
* 2. creation of AngularJS v1 directive from Angular v2 component.
28+
* 2. creation of Angular 1 directive from Angular 2+ component.
2929
* (See [UpgradeAdapter#downgradeNg2Component()])
3030
* 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks
3131
* coexisting in a single application.
@@ -40,20 +40,20 @@ let upgradeCount: number = 0;
4040
* 2. Each DOM element on the page is owned exactly by one framework. Whichever framework
4141
* instantiated the element is the owner. Each framework only updates/interacts with its own
4242
* DOM elements and ignores others.
43-
* 3. AngularJS v1 directives always execute inside AngularJS v1 framework codebase regardless of
43+
* 3. Angular 1 directives always execute inside Angular 1 framework codebase regardless of
4444
* where they are instantiated.
45-
* 4. Angular v2 components always execute inside Angular v2 framework codebase regardless of
45+
* 4. Angular 2+ components always execute inside Angular 2+ framework codebase regardless of
4646
* where they are instantiated.
47-
* 5. An AngularJS v1 component can be upgraded to an Angular v2 component. This creates an
48-
* Angular v2 directive, which bootstraps the AngularJS v1 component directive in that location.
49-
* 6. An Angular v2 component can be downgraded to an AngularJS v1 component directive. This creates
50-
* an AngularJS v1 directive, which bootstraps the Angular v2 component in that location.
47+
* 5. An Angular 1 component can be upgraded to an Angular 2+ component. This creates an
48+
* Angular 2+ directive, which bootstraps the Angular 1 component directive in that location.
49+
* 6. An Angular 2+ component can be downgraded to an Angular 1 component directive. This creates
50+
* an Angular 1 directive, which bootstraps the Angular 2+ component in that location.
5151
* 7. Whenever an adapter component is instantiated the host element is owned by the framework
5252
* doing the instantiation. The other framework then instantiates and owns the view for that
5353
* component. This implies that component bindings will always follow the semantics of the
54-
* instantiation framework. The syntax is always that of Angular v2 syntax.
55-
* 8. AngularJS v1 is always bootstrapped first and owns the bottom most view.
56-
* 9. The new application is running in Angular v2 zone, and therefore it no longer needs calls to
54+
* instantiation framework. The syntax is always that of Angular 2+ syntax.
55+
* 8. Angular 1 is always bootstrapped first and owns the bottom most view.
56+
* 9. The new application is running in Angular 2+ zone, and therefore it no longer needs calls to
5757
* `$apply()`.
5858
*
5959
* ### Example
@@ -124,19 +124,19 @@ export class UpgradeAdapter {
124124
}
125125

126126
/**
127-
* Allows Angular v2 Component to be used from AngularJS v1.
127+
* Allows Angular 2+ Component to be used from Angular 1.
128128
*
129-
* Use `downgradeNg2Component` to create an AngularJS v1 Directive Definition Factory from
130-
* Angular v2 Component. The adapter will bootstrap Angular v2 component from within the
131-
* AngularJS v1 template.
129+
* Use `downgradeNg2Component` to create an Angular 1 Directive Definition Factory from
130+
* Angular 2+ Component. The adapter will bootstrap Angular 2+ component from within the
131+
* Angular 1 template.
132132
*
133133
* ## Mental Model
134134
*
135-
* 1. The component is instantiated by being listed in AngularJS v1 template. This means that the
136-
* host element is controlled by AngularJS v1, but the component's view will be controlled by
137-
* Angular v2.
138-
* 2. Even thought the component is instantiated in AngularJS v1, it will be using Angular v2
139-
* syntax. This has to be done, this way because we must follow Angular v2 components do not
135+
* 1. The component is instantiated by being listed in Angular 1 template. This means that the
136+
* host element is controlled by Angular 1, but the component's view will be controlled by
137+
* Angular 2+.
138+
* 2. Even thought the component is instantiated in Angular 1, it will be using Angular 2+
139+
* syntax. This has to be done, this way because we must follow Angular 2+ components do not
140140
* declare how the attributes should be interpreted.
141141
*
142142
* ## Supported Features
@@ -185,17 +185,17 @@ export class UpgradeAdapter {
185185
}
186186

187187
/**
188-
* Allows AngularJS v1 Component to be used from Angular v2.
188+
* Allows Angular 1 Component to be used from Angular 2+.
189189
*
190-
* Use `upgradeNg1Component` to create an Angular v2 component from AngularJS v1 Component
191-
* directive. The adapter will bootstrap AngularJS v1 component from within the Angular v2
190+
* Use `upgradeNg1Component` to create an Angular 2+ component from Angular 1 Component
191+
* directive. The adapter will bootstrap Angular 1 component from within the Angular 2+
192192
* template.
193193
*
194194
* ## Mental Model
195195
*
196-
* 1. The component is instantiated by being listed in Angular v2 template. This means that the
197-
* host element is controlled by Angular v2, but the component's view will be controlled by
198-
* AngularJS v1.
196+
* 1. The component is instantiated by being listed in Angular 2+ template. This means that the
197+
* host element is controlled by Angular 2+, but the component's view will be controlled by
198+
* Angular 1.
199199
*
200200
* ## Supported Features
201201
*
@@ -208,7 +208,7 @@ export class UpgradeAdapter {
208208
* - Only some of the features of
209209
* [Directive Definition Object](https://docs.angularjs.org/api/ng/service/$compile) are
210210
* supported:
211-
* - `compile`: not supported because the host element is owned by Angular v2, which does
211+
* - `compile`: not supported because the host element is owned by Angular 2+, which does
212212
* not allow modifying DOM structure during compilation.
213213
* - `controller`: supported. (NOTE: injection of `$attrs` and `$transclude` is not supported.)
214214
* - `controllerAs': supported.
@@ -325,11 +325,11 @@ export class UpgradeAdapter {
325325
}
326326

327327
/**
328-
* Bootstrap a hybrid AngularJS v1 / Angular v2 application.
328+
* Bootstrap a hybrid Angular 1 / Angular 2+ application.
329329
*
330-
* This `bootstrap` method is a direct replacement (takes same arguments) for AngularJS v1
330+
* This `bootstrap` method is a direct replacement (takes same arguments) for Angular 1
331331
* [`bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method. Unlike
332-
* AngularJS v1, this bootstrap is asynchronous.
332+
* Angular 1, this bootstrap is asynchronous.
333333
*
334334
* ### Example
335335
*
@@ -401,7 +401,7 @@ export class UpgradeAdapter {
401401
}
402402

403403
/**
404-
* Allows AngularJS v1 service to be accessible from Angular v2.
404+
* Allows Angular 1 service to be accessible from Angular 2+.
405405
*
406406
*
407407
* ### Example
@@ -441,7 +441,7 @@ export class UpgradeAdapter {
441441
}
442442

443443
/**
444-
* Allows Angular v2 service to be accessible from AngularJS v1.
444+
* Allows Angular 2+ service to be accessible from Angular 1.
445445
*
446446
*
447447
* ### Example
@@ -607,7 +607,7 @@ interface ComponentFactoryRefMap {
607607

608608
/**
609609
* Synchronous promise-like object to wrap parent injectors,
610-
* to preserve the synchronous nature of AngularJS v1's $compile.
610+
* to preserve the synchronous nature of Angular 1's $compile.
611611
*/
612612
class ParentInjectorPromise {
613613
private injector: Injector;
@@ -723,7 +723,7 @@ function ng1ComponentDirective(info: ComponentInfo, idPrefix: string): Function
723723
}
724724

725725
/**
726-
* Use `UpgradeAdapterRef` to control a hybrid AngularJS v1 / Angular v2 application.
726+
* Use `UpgradeAdapterRef` to control a hybrid Angular 1 / Angular 2+ application.
727727
*
728728
* @stable
729729
*/
@@ -746,16 +746,16 @@ export class UpgradeAdapterRef {
746746
}
747747

748748
/**
749-
* Register a callback function which is notified upon successful hybrid AngularJS v1 / Angular v2
749+
* Register a callback function which is notified upon successful hybrid Angular 1 / Angular 2+
750750
* application has been bootstrapped.
751751
*
752-
* The `ready` callback function is invoked inside the Angular v2 zone, therefore it does not
752+
* The `ready` callback function is invoked inside the Angular 2+ zone, therefore it does not
753753
* require a call to `$apply()`.
754754
*/
755755
public ready(fn: (upgradeAdapterRef?: UpgradeAdapterRef) => void) { this._readyFn = fn; }
756756

757757
/**
758-
* Dispose of running hybrid AngularJS v1 / Angular v2 application.
758+
* Dispose of running hybrid Angular 1 / Angular 2+ application.
759759
*/
760760
public dispose() {
761761
this.ng1Injector.get(NG1_ROOT_SCOPE).$destroy();

0 commit comments

Comments
 (0)