Ng Ng Value
# AngularJS `ng-value` Directive
[ AngularJS Reference](#)
* * *
## AngularJS Example
Set the value of an input field:
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.myVar = "Hello World!";
});
[Try it Β»](#)
* * *
## Definition and Usage
The **ng-value** directive sets the value attribute of an input or select element.
* * *
## Syntax
The `` and `` elements support this attribute.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _expression_ | An expression that sets the value of the value attribute. |
* * AngularJS Reference](#)
YouTip