f) Added minor HTML-fixes and missing CSS
+/* HeroDetailComponent's private CSS styles */
+label {
+ display: inline-block;
+ width: 3em;
+ margin: .5em 0;
+ color: #607D8B;
+ font-weight: bold;
+}
+input {
+ height: 2em;
+ font-size: 1em;
+ padding-left: .4em;
+}
+button {
+ margin-top: 20px;
+ font-family: Arial;
+ background-color: #eee;
+ border: none;
+ padding: 5px 10px;
+ border-radius: 4px;
+ cursor: pointer;
+}
+button:hover {
+ background-color: #cfd8dc;
+}
+button:disabled {
+ background-color: #eee;
+ color: #ccc;
+ cursor: auto;
+}
<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>