` and bind
its `hidden` property to the `HeroFormComponent.submitted` property.
-+makeExample('forms/ts/src/app/hero-form.component.html', 'edit-div')
++makeExample('forms/ts/src/app/hero-form.component.html', 'edit-div', 'app/hero-form.component.html (excerpt)')
:marked
The main form is visible from the start because the
- the `submitted` property is false until we submit the form
- ... as this fragment from the `HeroFormComponent` reminds us:
+ the `submitted` property is false until we submit the form,
+ as this fragment from the `HeroFormComponent` reminds us:
+makeExample('forms/ts/src/app/hero-form.component.ts', 'submitted')
:marked
- When we click the "Submit" button, the `submitted` flag becomes true and the form disappears
+ When we click the Submit button, the `submitted` flag becomes true and the form disappears
as planned.
Now we need to show something else while the form is in the submitted state.
Add the following block of HTML below the `
` wrapper we just wrote:
-+makeExample('forms/ts/src/app/hero-form.component.html', 'submitted')
++makeExample('forms/ts/src/app/hero-form.component.html', 'submitted', 'app/hero-form.component.html (excerpt)')
:marked
There's our hero again, displayed read-only with interpolation bindings.
This slug of HTML only appears while the component is in the submitted state.
- There's an "Edit" button whose click event we bound to an expression
+ We added an Edit button whose click event is bound to an expression
that clears the `submitted` flag.
- Click it and this block disappears and the editable form reappears.
+ When we click it, this block disappears and the editable form reappears.
That's as much drama as we can muster for now.
@@ -596,7 +606,7 @@ figure.image-display
- Property Binding to disable the submit button when the form is invalid.
- Custom CSS classes that provide visual feedback to users about required invalid controls.
- Here’s the final version of the application includes all of these framework features:
+ Here’s the final version of the application:
+makeTabs(
`forms/ts/src/app/hero-form.component.html,
diff --git a/public/resources/images/devguide/forms/control-state-transitions-anim.gif b/public/resources/images/devguide/forms/control-state-transitions-anim.gif
new file mode 100644
index 0000000000..48ce7805af
Binary files /dev/null and b/public/resources/images/devguide/forms/control-state-transitions-anim.gif differ