Directives

One of the most important features of AngularJS is that it has majorly improved the HTML authoring story. It has extended the HTML vocabulary through directives, enabling a declarative style of defining the user interface. You can use its powerful, built-in directives and easily define new ones.

We have used a lot of directives in the examples presented so far, and most of them used the ng- prefix. When you take a look at the directives' documentation pages at http://code.angularjs.org/1.2.15/docs/api, you will notice that the directive names appear slightly different—ng-app is ngApp and ng-controller is ngController. AngularJS removes any data- or x- prefixes from the HTML markup and converts the -, _, and : characters to a camel case ...

Get Learning AngularJS for .NET Developers now with O’Reilly online learning.

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