MOCKSTACKS
EN
Questions And Answers

More Tutorials









Angular Built-In Directives Cheat Sheet


ng-app Sets the AngularJS section.

ng-init Sets a default variable value.

ng-bind Alternative to {{ }} template.

ng-bind-template Binds multiple expressions to the view.

ng-non-bindable States that the data isn't bindable.

ng-bind-html Binds inner HTML property of an HTML element.

ng-change Evaluates specified expression when the user changes the input.

ng-checked Sets the checkbox.

ng-class Sets the css class dynamically.

ng-cloak Prevents displaying the content until AngularJS has taken control.

ng-click Executes a method or expression when element is clicked.

ng-controller Attaches a controller class to the view.

ng-disabled Controls the form element's disabled property

ng-form Sets a form

ng-href Dynamically bind AngularJS variables to the href attribute.

ng-include Used to fetch, compile and include an external HTML fragment to your page.

ng-if Remove or recreates an element in the DOM depending on an expression

ng-switch Conditionally switch control based on matching expression.

ng-model Binds an input,select, textarea etc elements with model property.

ng-readonly Used to set readonly attribute to an element.

ng-repeat Used to loop through each item in a collection to create a new template.

ng-selected Used to set selected option in element.

ng-show/ng-hide Show/Hide elements based on an expression.

ng-src Dynamically bind AngularJS variables to the src attribute.

ng-submit Bind angular expressions to onsubmit events.

ng-value Bind angular expressions to the value of .

ng-required Bind angular expressions to onsubmit events.

ng-style Sets CSS style on an HTML element.

ng-pattern Adds the pattern validator to ngModel.

ng-maxlength Adds the maxlength validator to ngModel.

ng-minlength Adds the minlength validator to ngModel.

ng-classeven Works in conjunction with ngRepeat and take effect only on odd (even) rows.

ng-classodd Works in conjunction with ngRepeat and take effect only on odd (even) rows.

ng-cut Used to specify custom behavior on cut event.

ng-copy Used to specify custom behavior on copy event.

ng-paste Used to specify custom behavior on paste event.

ng-options Used to dynamically generate a list of elements for the element.

ng-list Used to convert string into list based on specified delimiter.

ng-open Used to set the open attribute on the element, if the expression inside ngOpen is truthy.

Conclusion

In this page (written and validated by ) you learned about AngularJS Built-In Directives Cheat Sheet . What's Next? If you are interested in completing AngularJS tutorial, your next topic will be learning about: AngularJS ngInclude.



Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: mockstacks@gmail.com.


Share On:


Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using Mockstacks.com, you agree to have read and accepted our terms of use, cookies and privacy policy.