Ang utos ng ng-value ng AngularJS

Paglilinaw at paggamit

ng-value Ipinagpapatupad ang inutang na elemento o napiling elemento value Properties.

Example

Set the value of the input field:

<div ng-app="myApp" ng-controller="myCtrl">
<input ng-value="myVar">
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.myVar = "Hello World!";
});
</script>

Try It Yourself

Syntax

<input ng-value="expression</input>

na <input> at <select> Element Support.

Parameters

Parameters Description
expression Ang expression na naglalagay ng value attribute ng setting element.