Summary
In this chapter, we studied the elements responsible for rendering the interface of our project, the components. We saw how to create and organize the components in a granular way, resulting in our project being more maintainable.
We also studied how to communicate between components using the @Input
and @Output
attributes, using the capabilities of Angular that facilitate this communication.
We saw the good practice of using TrackBy
to iterate lists in templates using the ngFor
directive, improving performance specifically for lists with many items.
Finally, we study the design pattern of the Smart and Presentation components, a way of organizing components and their interactions in order to simplify this orchestration with a unidirectional information flow.
In the next chapter, we will study the Angular elements responsible for the business rules and interaction with the backend – the services.