Angular directives integrate the HTML view with the application state. Directives help us manipulate views as application state changes and respond to view updates with little or no manual interaction with the actual DOM.
Depending upon how they affect the view, these directives are further classified into three types.
Component directives or components are directives with an encapsulated view. In Angular, when we build UI widgets, we are building components. We have already built a lot of them, such as WorkoutRunnerComponent
, WorkoutAudioComponent
, VideoPlayerComponent
, and many more!
An important point to realize here is that the view is bound to the component implementation and it can only work with properties and events defined on the backing component.