7. Creating Your Own Custom Directives to Extend HTML

As with many other features of AngularJS, you can extend directive functionality by creating your own custom directives. Custom directives enable you to extend the functionality of HTML by implementing the behavior of elements yourself. If you have code that needs to manipulate the DOM, you should make this happen by using a custom directive. As with the built-in directive, custom directives provide the capability to interact with form elements, bind data in the scope to the view, and interact with browser events.

This chapter discusses the design and implementation of custom directives. You will also get a chance to see a couple of basic examples of custom directives that extend the capability of HTML.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset