-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