![]() |
VOOZH | about |
The ng-value Directive in AngularJS is used to specify the value of an input element. This directive can be used to achieve the one-way binding for the given expression to an input element, especially when the ng-model directive is not used for that specific element. It is supported by <input> and <select> elements.
Syntax:
<element ng-value="expression"> Content ... </element>
Parameter value:
Example 1: This example describes the basic usage of the ng-value Directive in AngularJS.
Output:
Example 2: This example describes the ng-value directive in AngularJS, where a value is selected from the list & correspondingly, rendering that value.
Output: