As we conclude this chapter, we now have a better understanding of how directives work and how to use them effectively.
We started the chapter by building a RemoteValidatorDirective
, and learned a lot about Angular's support for asynchronous validations.
Next in line was BusyIndicatorDirective
, again an excellent learning ground. We explored the renderer service, which allows component view manipulation in a platform-agnostic way. We also learned about host bindings, which let us bind to a host element's events, attributes, and properties.
Angular allows directives declared across the view lineage to be injected into the lineage. We dedicated a few sections to understanding this behavior.
The third directive (component) that we created was AjaxButtonComponent
. It helped us understand the critical difference between content children and view children for a component.
We also touched upon structural directives, where we explored the NgIf
platform directive.
Lastly, we looked at Angular's...