嗯,我的设计中有十个标签窗格,在第一个标签中,我曾经用以下内容加载数据 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);
});
}
答案 0 :(得分:0)
您必须更加具体地了解您的模型和视图。一般来说,这是一个范围问题。您必须检查应用更改的范围以及应用更改的模型。 你想用location.reload()实现什么?