0
我在隐藏输入时遇到问题。我有这个html:angular.js隐藏输入数据未更新
<form ng-controller="FormCtrl as a" ng-submit="a.something(a.form)" novalidate>
<input type="hidden" ng-model="a.form.unitPrice" ng-init="a.form.unitPrice = product.prices[0].price" value="{{a.form.option}}">
...
.form.unitPrice
的价值是dinamiically改变。控制器:
this.addToCart = function(a) {
console.log(a);
console.log ($scope.a.form.unitPrice);
};
这是什么问题?你的烦恼是什么? – 2015-02-23 09:24:01
可能是:http://stackoverflow.com/questions/18446359/angularjs-does-not-send-hidden-field-value – Cherniv 2015-02-23 09:24:32
@Shervin当我呼叫控制器,切尔诺夫时,它没有更新该输入的值我试过这个解决方案,但不适合我 – dontHaveName 2015-02-23 10:14:47