Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 142e835

Browse files
Rafael SotomayorRafael Sotomayor
authored andcommitted
Completed conversion
1 parent 651768c commit 142e835

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/hero-detail.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { Component, Input } from '@angular/core';
2+
import { Hero } from './hero';
23

34
@Component({
45
selector: 'my-hero-detail',
56
template: `
67
<div *ngIf="hero">
7-
<h2>{{hero.name }} details!</h2>
8+
<h2>{{hero.name}} details!</h2>
89
<div><label>id: </label>{{hero.id}}</div>
910
<div>
1011
<label>name: </label>
11-
<input[(ngModel)]="hero.name" placeholder= "name">
12+
<input [(ngModel)]="hero.name" placeholder="name"/>
1213
</div>
1314
</div>
14-
`
15+
`
1516
})
1617

1718
export class HeroDetailComponent {
19+
@Input()
1820
hero: Hero;
1921
}

0 commit comments

Comments
 (0)