【发布时间】:2015-12-24 00:44:48
【问题描述】:
嗯,我的设计中有十个选项卡窗格,在第一个选项卡中,我曾经使用 ng-bind(),也有已付和未付发票标签,有 popmodel 进行付款。
问题是,如果我通过保存按钮对该模型弹出窗口执行任何操作,来自其他选项卡的其余绑定数据就会消失。我只想刷新那个特定的标签。
我使用这个代码 location.reload();或 $state.reload();但没有用,它只是重新加载页面。
这是任何解决方案吗..请与我分享
$scope.collectbill = function() {
$scope.billDet.amount = $scope.final_amount;
$scope.billDet.user_id_pk = sessVar.user_id_pk;
console.log($scope.billDet);
$http.post('/billPay', $scope.billDet)
.success(function(data) {
if (data.errorMessage != null) {
console.log(data.errorMessage);
//$scope.frmData = {}; // clear the form so our user is ready to enter another
} else {
$location.url('/custdetails?' + $scope.invisibleMenu.listcustomer);
//window.location = "dashboard#/listcustomer";
//location.reload();
//$state.reload();
Success_Msg("bill Pay", data.msg);
//location.reload();
}
})
.error(function(data, status, headers) {
console.log('Error: ' + data);
});
}
【问题讨论】:
标签: javascript angularjs refresh reload