Core components
In the previous section, we refactored our code to make it more object-oriented and reusable using the features of TypeScript. These changes did not have any impact on the user interface of our application but did make our code more robust and easy to maintain. In this section, we will focus on adding a couple of new components to our application: a header and footer.
In the previous chapter, we had a header to our application but it was part of the news component itself. This approach is not very extensible because, whenever we need to add a new component/feature to our application, we would need to make sure that we have a header HTML also included in the same component. Angular solves these problems by allowing us to compose ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access