Summary
This chapter covered forms, directives, and user control-related functionality for LemonMart. Using data binding, we created reusable components that can be embedded within another component. We showed that you can use PUT to send data to a server and cache data input by a user. We also created a multi-step input form that is responsive to changing screen sizes. We removed the boilerplate code from our components by leveraging reusable form parts, a base form class to house common functionality, and an attribute directive to encapsulate field-level error behavior and messages.
We created dynamic form elements with a date picker, typeahead support, and form arrays. We implemented interactive controls with input masking and the lemon rater. Using the ControlValueAccessor
interface, we integrated the lemon rater seamlessly with our form. We showed that we can scale the size and complexity of our forms linearly by extracting the name as its form section. Additionally, we covered...