docs(upgrade): rename undeclared `Ng2` to `Ng2Component` (#11950)

This commit is contained in:
Austin 2016-09-27 19:11:41 -04:00 committed by Rado Kirov
parent a241ab7c07
commit 34b31dea7c
1 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ var upgradeCount: number = 0;
* ``` * ```
* var adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module)); * var adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module));
* var module = angular.module('myExample', []); * var module = angular.module('myExample', []);
* module.directive('ng2Comp', adapter.downgradeNg2Component(Ng2)); * module.directive('ng2Comp', adapter.downgradeNg2Component(Ng2Component));
* *
* module.directive('ng1Hello', function() { * module.directive('ng1Hello', function() {
* return { * return {
@ -237,17 +237,17 @@ export class UpgradeAdapter {
* }; * };
* }); * });
* *
* module.directive('ng2', adapter.downgradeNg2Component(Ng2)); * module.directive('ng2', adapter.downgradeNg2Component(Ng2Component));
* *
* @Component({ * @Component({
* selector: 'ng2', * selector: 'ng2',
* template: 'ng2 template: <greet salutation="Hello" [name]="world">text</greet>' * template: 'ng2 template: <greet salutation="Hello" [name]="world">text</greet>'
* }) * })
* class Ng2 { * class Ng2Component {
* } * }
* *
* @NgModule({ * @NgModule({
* declarations: [Ng2, adapter.upgradeNg1Component('greet')], * declarations: [Ng2Component, adapter.upgradeNg1Component('greet')],
* imports: [BrowserModule] * imports: [BrowserModule]
* }) * })
* class MyNg2Module {} * class MyNg2Module {}