2015-09-26 201 views
0

嗯,我的設計中有10個選項卡窗格,第一個選項卡中我用來加載數據 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

你必須要更具體的瞭解您的模型和視圖共享。一般來說,這是一個範圍問題。您必須檢查您的更改應用於哪個$ scope,以及更改應用於哪個模型。 你想用location.reload()來實現什麼?

+0

請檢查一下我做了什麼 –

+0

我還是不明白爲什麼要重新加載頁面。我希望將賬單的狀態更改爲「已付款」,並且該視圖將立即反映新的狀態。所以在成功功能,你做$ scope.bill.status ='支付',並在模板中的東西,如:

+0

我修復了哥們..現在我想重新加載特定的標籤屬於組標籤是處於活動狀態狀態..就像我有9個標籤,Document是其中一個選項卡 - 用戶可以在其中上傳文檔以進行驗證。我給出了三個下拉值作爲休閒1. id證明,2,申請表,3.地址證明,其實單個文件上傳,希望你明白,我只想刷新每個上傳單個標籤 –

相關問題