AngularJS ng-href Directive26 Sept 2024 | 1 min read 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 even if the user clicks the link beforethe code execution. It is supported by <a> element. Syntax: Parameter explanation: string: It specifies a string value, or an expression resulting in a string. Let's take an example to demonstrate the ng-href directive. See this example: Test it NowNext Topicangularjs-ng-if-directive |
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-keyup Directive The AngularJS ng-keyup directive specifies the custom behavior of AngularJS when you leave a key after pressing 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...
1 min read
AngularJS ng-focus Directive The AngularJS ng-focus directive specifies the custom behavior on focus event. It tells AngularJS what to do when an HTML element gets focus. It doesn't override the element's original onfocus event, both will be executed. It is supported by HTML elements like < a...
1 min read
AngularJS ng-click Directive The AngularJS ng-click directive facilitates you to specify custom behavior when an element is clicked. So, it is responsible for the result what you get after clicking. It is supported by all HTML elements. Syntax: <element ng-click="expression"></element> Parameter explanation: expression: It specifies an expression that is...
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-class-even Directive 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...
1 min read
AngularJS ng-bind Directive The AngularJS ng-bind directive replaces the content of an HTML element with the value of a given variable, or expression. If you change the value of the given variable or expression, AngularJS changes the content of the specified HTML element as well as. It...
1 min read
AngularJS ng-app Directive The AngularJS ng-app specifies that it is the root element of the AngularJS application. All AngularJS application must contain a root element. You can only have one ng-app directive in your HTML document. If you have more than one ng-app directive; the first appeared...
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-value Directive The AngularJS ng-value directive is used to set the value attribute of an input element, or a select element. It is mainly used on <radio> and <option> elements to set the bound values when these elements are selected. It is supported by <input> and <select>...
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