Delving into AngularJS directives

Before we get started with building our application and integrating Facebook and all, let's first take a moment to learn about directives as we plan to integrate our Facebook authentication module as a directive.

What is a directive?

A directive is a marker on a DOM element that tells AngularJS to transform the DOM element or attach a specified behavior to it. The marker would be a CSS class, a custom attribute, or a custom element name.

AngularJS comes with a large set of predefined directives, many of which we've already been using till now. Some of the built-in directives that we've used so far are ng-app, ng-repeat, ng-model, and ng-view.

One of the coolest features of AngularJS is the ability to create your own ...

Get AngularJS Web Application Development Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.