Kick Your Components up a Notch with Directives BAM!
summary
Shows how Angular attribute directives deliver concrete behavior: uses hostBinding to toggle element properties, hostListener to handle clicks, and EventEmitter (Output) to emit changes; implements dependency injection of a security service, subscribes/unsubscribes to role observables, and exposes a lockdown attribute that sets the disabled property on buttons. The example repo demonstrates the directive applied across components to enable/disable actions based on roles and it works live in the demo.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:37Types of Directives
- 2:43Examples of Usage with Directives
- 5:27Color Cycle
- 5:41Host Listener
- 6:45Exposing Events
- 7:02Event Emitter
- 12:00Host Binding
related talks
33mDemystified Angular Directives
40mAdvanced UI, Plugins and Components in AngularJS
32mClean Up Your Dom By Using The Full Power Of Angular Host Elements
34mAngular Elements
28mFrom Scratch to Screen: The Art of Component Design in Angular
34mAngular Elements
20mEngineering Scalable Angular Components
30mAngular 2.0 Core
