How to Write Custom AngularJS Directives
Much of Angular’s built-in functionality is provided by modular slices of code called directives. You can write custom directives to perform form validation, to minimize code repetition, to attach events to elements, to inject markup into templates, and more. Directives