AngularJS ng-class-odd Directive26 Sept 2024 | 1 min read The AngularJS ng-class-odd directive works exactly same as ng-class, but it is used together with ng-repeat and take effect only on odd rows. The ng-class-odd directive is always used within the scope of ng-repeat directive. It is supported by all HTML elements. Syntax: Parameter explanation: expression: It specifies an expression that returns one or more class names.Let's take an example to demonstrate ng-class-odd directive. See this example: Test it NowNext TopicAngularJS ng-click Directive |
AngularJS ng-include Directive The AngularJS ng-include directive is used to fetch, compile and include an external HTML fragment. These are added as childnodes of the specified element. The ng-include attribute's value can also be an expression, returning a filename. By default, the included file must be located...
1 min read
AngularJS ng-href Directive The AngularJS ng-href directive provides a replacement for the original href attribute of an <a> element. You can use the ng-href directive instead of href if you have AngularJS code inside the href value. The ng-href directive ensures that the link is not broken...
1 min read
AngularJS ng-blur Directive The AngularJS ng-blur directive specifies that what to do if an HTML element loses focus. It doesn't override the element's original onblur event and both the ng-blur expression and the original onblur event will be executed. Note: This ng-blur directive is supported by the HTML...
1 min read
AngularJS ng-keypress Directive The AngularJS ng-keypress directive specifies the custom behavior of AngularJS when you press any on the keyboard for a specific HTML element. Following is the order of a key stroke: Keydown Keypress Keyup It is supported by <input>, <select>, <textarea>, and other editable elements. Syntax: <element ng-keypress="expression"></element> Parameter explanation: expression: It...
1 min read
AngularJS ng-checked Directive The AngularJS ng-checked directive is used to set a checked attribute on the element and add a checkbox or a radiobutton. You can set its value true or false. The checkbox, or radiobutton, will be checked if the expression inside the ng-checked attribute returns...
1 min read
AngularJS ng-show Directive The AngularJS ng-show directive is used to show or hide the given HTML element according to the expression given to the ng-show attribute. It shows the specified HTML element if the given expression is true, otherwise it hides the HTML element. It is supported by all...
1 min read
AngularJS ng-style Directive The AnglarJS ng-style directive facilitates you to set CSS style for the HTML elements. The value of ng-style attribute must be an object, or an expression returning an object. Object contains CSS properties and values, in key value pairs. It is supported by all HTML...
1 min read
AngularJS ng-src Directive The AngularJS ng-src directive is used to solve the problem where original src attribute doesn't work properly. So AngularJS ng-src directive is used and it overrides the original src attribute of an <img> element. The ng-src directive should be used instead of src...
1 min read
AngularJS ng-bind-template Directive The AngularJS ng-bind-template directive specifies that the text content should be replaced with a template. It replaces the content of an HTML element with the value of the given expressions. Unlike ngBind, the ngBindTemplate can contain multiple {{ }} expressions. So, it is...
1 min read
AngularJS ng-jq Directive The AngularJS ng-jq directive is used to force the angular.element library. This directive forces either jqLite by leaving ng-jq blank or sets the name of the jQuery variable under window. It is used before the script which loads Angular. Syntax: <ng-jq [ng-jq="string"]> ... </ng-jq> Parameter explanation: ng-jq: It...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India