parent
9b2c54e77f
commit
2bc166c34f
|
@ -259,12 +259,12 @@ figure.image-display
|
||||||
As we noted above, that is the component's cue to create and present an empty hero.
|
As we noted above, that is the component's cue to create and present an empty hero.
|
||||||
|
|
||||||
Add the following HTML to the `heroes.component.html`, just below the hero list (the `*ngFor`).
|
Add the following HTML to the `heroes.component.html`, just below the hero list (the `*ngFor`).
|
||||||
+makeExample('toh-6/ts/app/heroes.component.html', 'add-hero', 'app/heroes.component.ts (add)')(format=".")
|
+makeExample('toh-6/ts/app/heroes.component.html', 'add-hero', 'app/heroes.component.html (add)')(format=".")
|
||||||
:marked
|
:marked
|
||||||
The user can *delete* an existing hero by clicking a delete button next to the hero's name.
|
The user can *delete* an existing hero by clicking a delete button next to the hero's name.
|
||||||
|
|
||||||
Add the following HTML to the `heroes.component.html` right after the name in the repeated `<li>` tag:
|
Add the following HTML to the `heroes.component.html` right after the name in the repeated `<li>` tag:
|
||||||
+makeExample('toh-6/ts/app/heroes.component.html', 'delete-hero', 'app/heroes.component.ts (delete)')(format=".")
|
+makeExample('toh-6/ts/app/heroes.component.html', 'delete-hero', 'app/heroes.component.html (delete)')(format=".")
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
Now let's fix-up the `HeroesComponent` to support the *add* and *delete* actions in the template.
|
Now let's fix-up the `HeroesComponent` to support the *add* and *delete* actions in the template.
|
||||||
|
|
Loading…
Reference in New Issue