Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-grid paging
Message
 
 
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01609778
Message ID:
01609837
Views:
32
Here is another problem which may be related. My code in the Load method:
 var loadAccount = function (id, isNew) {
              $scope.alertType = '';
              $scope.loadingTimeout = $timeout(function () {
                  $scope.isEditLoading = true;
              }, 250);
              accountsService.getAccount(id, isNew, $scope.showFinalized).then(function (data) {
                  $scope.currentAccount = data;
                  $scope.currentAccount.totalBalance = 0;
                  $scope.gridData = $scope.currentAccount.invoices;
                  $scope.currentAccount.fullPhone = $filter('phone')($.trim(data.areaCode) + '' + $.trim(data.phone));
                  var systemAccounts = ["*GUESTS*", "*RESRVATN*", "*TABLES*", "*DEBIT*"];

                  $scope.currentAccount.isSystemAccount = false;
                  $scope.isNew = isNew;
                  if (!isNew) {
                      $scope.currentAccount.isSystemAccount = systemAccounts.indexOf($scope.currentAccount.acctName.trim()) >= 0;
                      $scope.getPagedDataAsync($scope.pagingOptions.pageSize, 1);
                      accountsService.getAccountBalance($scope.currentAccount.acctNameHash).then(function (data) {
                          $scope.currentAccount.totalBalance = data.balance;
                      });
                  }
                  $scope.showForm = true;
                  $scope.alertType = '';
                  $scope.isEditLoading = false;
                  $timeout.cancel($scope.loadingTimeout);
                  $timeout(function () {
                      $rootScope.$broadcast('sm:resizeContainer');
                      $rootScope.$broadcast('sm:focus');
                  }, 0);
              });
          };
When I set break point at the very top line of code, it breaks. However, all break points inside the
accountsService.getAccount(id, isNew, $scope.showFinalized).then(function (data) {
...
are not executed. However, I can clearly see that the code does execute as the balance and system account are shown correctly.

So, do you see what may be the problem and why I can not get inside that method? I think in other cases when I tried to debug other forms I have seen that code executing.

UPDATE. As soon as I commented out this line

// $scope.getPagedDataAsync($scope.pagingOptions.pageSize, 1);

in the inner portion of the code, the break points started to work.

The other problem is when there are 0 items initially, the paging options appear outside of the grid (beneath it) which I don't like.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform