Skip to content

Commit abed2cd

Browse files
gkalpakjasonaden
authored andcommitted
refactor(upgrade): fix examples for strictPropertyInitialization and remove internal comments (angular#18487) (angular#18487)
PR Close angular#18487 PR Close angular#18487
1 parent 2275891 commit abed2cd

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/examples/upgrade/static/ts/full/module.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class TextFormatter {
3939
<button (click)="addHero.emit()">Add Hero</button>`,
4040
})
4141
class Ng2HeroesComponent {
42-
// TODO(issue/24571): remove '!'.
4342
@Input() heroes !: Hero[];
4443
@Output() addHero = new EventEmitter();
4544
@Output() removeHero = new EventEmitter();
@@ -78,9 +77,7 @@ class HeroesService {
7877
class Ng1HeroComponentWrapper extends UpgradeComponent {
7978
// The names of the input and output properties here must match the names of the
8079
// `<` and `&` bindings in the AngularJS component that is being wrapped
81-
// TODO(issue/24571): remove '!'.
8280
@Input() hero !: Hero;
83-
// TODO(issue/24571): remove '!'.
8481
@Output() onRemove !: EventEmitter<void>;
8582

8683
constructor(elementRef: ElementRef, injector: Injector) {

packages/examples/upgrade/static/ts/lite/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class Ng2HeroesComponent {
104104
class Ng1HeroComponentWrapper extends UpgradeComponent {
105105
// The names of the input and output properties here must match the names of the
106106
// `<` and `&` bindings in the AngularJS component that is being wrapped.
107-
@Input() hero: Hero;
108-
@Output() onRemove: EventEmitter<void>;
107+
@Input() hero !: Hero;
108+
@Output() onRemove !: EventEmitter<void>;
109109

110110
constructor(elementRef: ElementRef, injector: Injector) {
111111
// We must pass the name of the directive as used by AngularJS to the super.

0 commit comments

Comments
 (0)