AngularJS ng-readonly Directive26 Sept 2024 | 1 min read The AnglarJS readonly directive sets the readonly attribute on the element; if it gets that the expression inside ng-readonly is true. It is only applied to input elements with specific types. The ng-readonly directive is necessary to enable to shift the values between true and false. In HTML, readonly attributes cannot be set to false. It is supported by <input> <textarea> elements. Syntax: Parameter explanation: expression: It specifies an expression that will set the element's readonly attribute if it returns true. Let's take an example to demonstrate ng-readonly directive. See this example: Test it NowNext TopicAngularJS ng-required Directive |
AngularJS ng-transclude Directive The AngularJS ng-transclude directive is used to mark the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion. The ng-transclude directive facilitates AngularJS to capture everything that is put inside the directive in the markup and use it somewhere in...
2 min read
AngularJS ng-change Directive AngularJS ng-change directive specifies what to do when the user changes the value of an HTML element. The ng-change directive evaluates the expression immediately unlike the JavaScript onchange event which only triggers at the end of the change. It doesn't wait until all changes...
1 min read
AngularJS ng-switch Directive The AngularJS ng-switch directive facilitates you to hide/show HTML elements according to an expression. Child elements with the ng-switch-when directive will be displayed if it gets a match, otherwise the element, and its children will be removed. If you want to define a default section...
1 min read
AngularJS ng-open Directive The AngularJS ng-open directive sets the open attribute of a detailed list. This detailed list is visible if the expression inside the ng-open in true. A special directive is required because interpolation cannot be used inside the open attribute. It is supported by the <details>element. Syntax: <details...
1 min read
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-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-cloak Directive The AngularJS ng-cloak directive is used to ent the document from showing incomplete AngularJS code while your application is loading. This directive also ents the undesirable flicker effects caused by the HTML template display when the application is being loaded. This is supported by...
1 min read
AngularJS ng-submit Directive The AngularJS ng-submit directive specifies a function to be executed when the form is submitted. If you don't use the ng-submit directive in the form then it will not be submitted. It is supported by <form> element. Syntax: <form ng-submit="expression"></form> Parameter explanation: expression: It specifies a function that...
2 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
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
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