Service.getData( $scope.data
function( data ) // success
{
$scope.data = {
schedule:data.value,
};
}单击编辑按钮,此函数将调用,文本框值将更新(schedule:data.value,)
<input type="text" data-ng-model="data.schedule" class="span12" ng-maxlength="5" maxlength="5" required ng-pattern="/\d+/" />除了IE-10之外,它还在其他浏览器中工作。
如果我们在文本框中编辑一个值并保存,然后再次单击“编辑”,它将在IE10中显示旧值。
请建议
我试过使用下面的代码,但没有工作。
$scope.data.schedule.push($scope.data.schedule);
$('#someid').val($scope.data.schedule);
$scope.data.schedule = '' ;发布于 2013-12-11 09:56:53
我得到了一个修复程序,它在所有浏览器中都能正常工作,但不确定是否是正确的修复。
var fetch_timestamp = function() { return parseInt(new Date().getTime().toString().substring(0, 10))};
var timestamp = fetch_timestamp();
url = url + '&t='+timestamp;这将清除缓存(它不会从浏览器获取)
https://stackoverflow.com/questions/20514068
复制相似问题