Advanced Custom Components with TypeScript

In the previous chapter, we discussed the basics of component creation and usage. This knowledge is not enough to build robust applications. We need to delve a little more deeply into Angular's exciting components and see how TypeScript makes working with components a lot easier.

We are going to address the following topics while showing some hands-on examples on how they work:

  • Lifecycle hooks: These are class methods in Angular that you can hook into. They are achievable by implementing a TypeScript interface.
  • ElementRef: This involves manipulating and querying DOM safely in Angular using the ElementRef API.
  • View encapsulation: You will learn how scoped styles are applied to Angular components ...

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.