AngularJS ng-value
Yönergesi
Örnek
Giriş alanının değerini ayarlayın:
<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>
Tanım ve Kullanım
Yönerge ng-value
, bir girdi öğesinin veya bir seçme öğesinin değer niteliğini ayarlar.
Sözdizimi
<input ng-value="expression"></input>
<input> ve <select> öğeleri tarafından desteklenir.
Parametre Değerleri
Value | Description |
---|---|
expression | An expression that will set the element's value attribute. |