Loading topic
@Directive decorator and a selector that says which elements the directive attaches to. It also covers how Angular matches the selector at compile time, and the mistakes that make a directive silently do nothing.7 min read@Directive and an attribute selector. Here you learn how a directive reaches the element it is attached to, which is called the host element, and how to c6 min readimports array. The earlier chapters in this tutorial covere5 min readimports a6 min read@Directive, apply it through a component's imports array, and use host listeners and signal inputs. It also assumes you know event binding syntax such as (click)="save()". The examples use the signal-based `outp6 min readexportAs option makes the directive instance available to the template thro6 min read@Directive, read the host element through ElementRef, and bind host properties and events. It also assumes you know what a service is and have seen inject() used in a component. Here you will see how a directive gets serv5 min readhost metadata, as covered in the earlier chapters. Here you will see how to attach existing directives to another directive or component, so that behavior is reused by composition.5 min readhost metadata property and signal inputs (the earlier chapters cover this). It also assumes you know basic TestBed usage and a test runner with describe, it, and expect, such as Jasmine or Jest. The examples run in a browse5 min read@Directive, the host metadata property, signal input() and output(), ElementRef, Renderer2, and hostDirectives. Here you will review the mistakes that most often cause bugs, memory leaks, s6 min read