Choose Your Own { Form } Adventure
A Modern Angular Fairy Tale ...
by Jennifer Wadella
Read to you by ...
- Director of Angular Development at Bitovi
- Angular GDE/ Queen of Angular Forms
- International Speaker (pre-pandemic)
- Kombucha brewin' crazy plant lady
"Mirror, mirror on the wall, who will get the highest valuation of them all?
- Build a form where users can choose
their favorite musical from a list of choices.
- Users to have to enter their favorite
song from the musical they selected.
- Don't allow users to use the song input
until they have chosen a musical.
AbstractControl is the key
- Validate that the number the user entered
is actually from that musical by checking against magical musicals API
- Show user when whole section of form is invalid
- Allow users to add multiple inputs to form to collect
information for musical roles and actors to play the role.
- Allow users to delete unneeded inputs
“I can use Reactive Forms
OR
Template Driven forms
to solve my problems!”
“Your openness to different approaches and not shaming technology choices has broken the spell on me.”
And They All Coded Happily Ever After.
The Moral of Our Story ...
There are different ways to solve problems in Angular, and whatever works best for YOU and your team is the best way to implement forms solutions.