O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Building Your Own Directives

While you can get a long way using just controllers and the built-in directives that come with AngularJS, there will inevitably come a point in the development of your application where you will need to teach your browser some new tricks by building your own directives. The main reasons why you would want to develop custom directives are:

  • You need to manipulate the DOM directly, such as with JQuery
  • You want to refactor parts of your application to remove repeated codes
  • You want to create new HTML mark-up for non-developers to use, such as designers

This chapter will introduce you to developing your own AngularJS directives. Directives appear in many different places and have different uses. In this chapter we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required