Summary
In this chapter, we learned how to create an Angular component using the Angular CLI and configure it using the @Component
decorator. We discussed how we could isolate the component's HTML template in an external file to ease its future maintainability. Also, we saw how to do the same with any style sheet we wanted to bind to the component, in case we do not want to bundle the component styles inline. We also went through communication between the component and its template in a bidirectional way using property and event bindings.
We were guided through the options available in Angular for creating powerful APIs for our components, so we can provide high levels of interoperability between components, configuring its properties by assigning either static values or managed bindings. We also saw how a component can act as a host component for another child component, instantiating the former's custom element in its template, setting the ground up for larger component...