-3
在這裏,我想在控制器功能evrytime文本字段值我改變了文本字段如何使用ng-change獲取控制器中的當前文本字段值?
<input type="text" name="quantity" ng-model="viewItemData1.quantity" ng-change="changePrice($event.target.value);">
$scope.changePrice = function(val)
{
console.log(val);
alert(val);
alert(JSON.stringfy(console.log(val)));
}
剛纔固定的,做工精細 $ scope.changePrice =功能(VAL) \t { \t \t \t var tprice =(val * $ scope.viewItemData1.quantity); $ scope.viewItemData.tprice = tprice; \t} – Chinna