I'm learning AngularJS. Is there a good comprehensive list of all the out-of-the-box directives? The FAQ mentions ng-repeat
, ng-show
, and ng-class
, but I get the sense there are plenty more. It seems odd I can't find a single place to discover the rest.
There are two types of AngularJs directives: Built-in directive.
AngularJS directives are extended HTML attributes with the prefix ng- . The ng-app directive initializes an AngularJS application. The ng-init directive initializes application data. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
What are Directives? At a high level, directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS's HTML compiler ( $compile ) to attach a specified behavior to that DOM element (e.g. via event listeners), or even to transform the DOM element and its children.
The listing can be found on their API page:
http://docs.angularjs.org/api/
If you're new to AngularJS, you might find this useful as well:
http://www.cheatography.com/proloser/cheat-sheets/angularjs/
It goes over the directives, filters, etc. and provides snippets of useful information on everything. You may need to read up more on something in the docs if it's confusing, but generally I find that cheat sheet to be enough for simple tasks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With