AngularJS ng-class-even Directive26 Sept 2024 | 1 min read The AngularJS ng-class-even directive works exactly same as ng-class, but it is used together with ng-repeat and take effect only on even rows. Note: It is a perfect directive for styling items in a list or rows in a table. It is supported by all HTML elements. Syntax: Parameter explanation: Let's take an example to demonstrate ng-class-even directive. See this example: Test it NowNext TopicAngularJS ng-class-odd Directive |
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-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-class-odd Directive 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: <element ng-class-odd="expression"></element>...
1 min read
AngularJS ng-init Directive The AngularJS ng-init directive facilitates you to evaluate the given expression in the current scope. Ng-controller is preferred over ng-init because the ng-init directive can add some unnecessary logic into the scope. It is supported by all HTML elements. Syntax: <element ng-init="expression" ></element> Parameter explanation: expression: It...
1 min read
AngularJS ng-dblclick Directive The AngularJS ng-dblclick directive facilitates you to specify custom behavior on a dblclick event. It tells what to do when an HTML element is double-clicked. It doesn't override the element's original ondblclick event, both are executed. It is supported by all HTML elements. Syntax: <element ng-dblclick="expression"></element>...
1 min read
AngularJS ng-keydown Directive The AngularJS ng-keydown directive specifies the custom behavior of AngularJS when the keyboard is used on the specific HTML element. It doesn't override the element's original onkeydown event, both will be executed. Following is the order of a key stroke: Keydown Keypress Keyup It is supported by <input>,<select>,<textarea>,...
1 min read
AngularJS ng-paste Directive The AnglarJS ng-paste directive specifies the custom behavior of AngularJS when text is pasted into an HTML element. It doesn't override the element's original onpaste event, both will be executed. It is supported by <input>, <select>, and <textarea> and other editable elements. Syntax: <element ng-paste="expression"></element> Parameter...
1 min read
AngularJS ng-controller Directive The AngularJS ng-controller directive adds a controller class to the view (your application). It is the key aspect which specifies the principles behind the Model-View-Controller design pattern. It facilitates you to write code and make functions and variables, which will be parts of an...
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-required Directive The AngularJS ng-required directive is used to add the required validator to ng-model. It is mainly used for input and select control but it can also be used for custom controls. The ng-required directive is necessary to makes you able to shift...
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