AngularJS Built in Directives

A directive in AngularJS is a meaningful name for a function that is attached with DOM elements. All AngularJS built in directives prefixed with the ng namespace. It is used to extend HTML elemets attribute. AngularJS directives have the ability to execute methods, define behavior, attach controllers and $scope objects, manipulate the DOM, and more.

Built in Directives

Here is a list of AngularJS built in directives with description.

DirectivesDescription
ng-appIt is added to set the AngularJS section.
ng-initIt sets default variable value.
ng-bindIt is an alternative to {{ }} template.
ng-bind-templateIt binds multiple expressions to the view.
ng-non-bindableIt used to not to bind data.
ng-bind-htmlIt used to bind inner HTML property of an HTML element.
ng-changeIt evaluates specified expression when the user changes the input.
ng-checkedIt is used to set checkbox checked.
ng-classIt is used to the css class dynamically.
ng-cloakIt is usedv to prevent displaying the content until AngularJS has taken control.
ng-clickIt is used to execute a method or expression when element is clicked.
ng-controllerIt is used to attach a controller class to the view.
ng-disabledIt is used to attach disabled attributes to the form element.
ng-formIt is used to set form within a form.
ng-hrefIt is used to dynamically bind AngularJS variables to the href attribute.
ng-includeIt is used to fetch, compile and include an external HTML fragment to your page.
ng-ifIt is used to remove or recreate an element in the DOM depending on an expression
ng-switchIt is used to conditionally switch control based on matching expression.
ng-modelIt is used to bind an input,select, textarea etc elements with model property.
ng-readonlyIt is used to set readonly attribute to an element.
ng-repeatIt is used to loop through each item in collection to create a new template.
ng-selectedIt is used to set selected option in <select> element.
ng-show/ng-hideIt workes based on expression, if true then the element is shown or hidden respectively.
ng-srcIt is used to dynamically bind AngularJS variables to the src attribute.
ng-submitIt is used to bind angular expressions to onsubmit events.
ng-valueIt is used to bind angular expressions to the value of <option>.
ng-requiredIt is used to bind angular expressions to onsubmit events.
ng-styleIt is used to set CSS style on an HTML element conditionally.
ng-patternIt is used to add the pattern validator to ngModel.
ng-maxlengthIt is used to adds the maxlength validator to ngModel.
ng-minlengthIt is used to adds the minlength validator to ngModel.
ng-classevenIt works in conjunction with ngRepeat and take effect only on odd (even) rows.
ng-classoddIt works in conjunction with ngRepeat and take effect only on odd (even) rows.
ng-cutIt is used to specify custom behavior on cut event.
ng-copyIt is used to specify custom behavior on copy event.
ng-pasteIt is used to specify custom behavior on paste event.
ng-optionsIt is used to dynamically generate a list of <option> elements for the <select> element.
ng-listIt is used to convert string into list based on specified delimiter.
ng-openIt is used to set the open attribute on the element, if the expression inside ngOpen is truthy.

See Also

AngularJS Built-in Filters
AngularJS Built-in Directives
AngularJS Expression
AngularJS Built-in Events
AngularJS Scope Methods
AngularJS Built-in Services
AngularJS Controller Inheritance
AngularJS Custom Directives


 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.