projects
/
examples
/
angular-tour-of-heroes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
5: Add In-app Navigation
[examples/angular-tour-of-heroes]
/
src
/
app
/
hero-detail
/
hero-detail.component.html
diff --git
a/src/app/hero-detail/hero-detail.component.html
b/src/app/hero-detail/hero-detail.component.html
index
512825a
..
540f0f0
100644
(file)
--- a/
src/app/hero-detail/hero-detail.component.html
+++ b/
src/app/hero-detail/hero-detail.component.html
@@
-1,9
+1,13
@@
+<div *ngIf="!hero">
+ <span>Loading hero...</span>
+</div>
<div *ngIf="hero">
<h2>{{hero.name | uppercase}} Details</h2>
<div><span>id: </span>{{hero.id}}</div>
<div>
<div *ngIf="hero">
<h2>{{hero.name | uppercase}} Details</h2>
<div><span>id: </span>{{hero.id}}</div>
<div>
- <label>name: </label>
- <input [(ngModel)]="hero.name" placeholder="Type a name..." />
+ <label>name:
+ <input [(ngModel)]="hero.name" placeholder="name"/>
+ </label>
</div>
</div>
<button (click)="goBack()">go back</button>
</div>
</div>
<button (click)="goBack()">go back</button>