14 Creating attribute directives

This chapter covers

  • Creating custom directives that modify a single HTML element
  • Configuring and applying custom directives
  • Receiving data in a custom directive
  • Using the directive lifecycle API
  • Generating custom events from directives
  • Creating directives that support template variables

In this chapter, I describe how custom directives can be used to supplement the functionality provided by the built-in ones of Angular. The focus of this chapter is attribute directives, which are the simplest type that can be created and that change the appearance or behavior of a single element. In chapter 14, I explain how to create structural directives, which are used to change the layout of the HTML document. Components ...

Get Pro Angular 16 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.