i have 3 tabs with pagination and sorting

so in my view:

<tabset><tab heading="Pending Transactions" ng-controller="Listing" 
ng-init="find('Pending')"></tab><tab heading="On Hold Transactions" 
ng-controller="Listing" ng-init="find('OnHold')"></tab><tab 
heading="Transaction Completed" ng-controller="Listing" 
ng-init="find('Completed')"></tab></tabset>

inside my controller i have method find():

$scope.find = function(status){
            var Counter = $resource('/transactions/count',{status:status},{
                query : {method:'GET', isArray:false}
            });

            $scope.populate = function(){
                Transactions.query({status:status, page : $scope.currentPage, 
sort: $scope.sort, by : $scope.by},function(transactions){
                    $scope.transactions = transactions;
                    angular.forEach($scope.transactions, function(transaction){
                        $scope.checkboxes[transaction._id] = false;
                    });
                });
            };

            $scope.sortBy = function(field){
                if($scope.sort !== field){
                    $scope.by = true;
                    $scope.sort = field;
                } else {
                    $scope.by = !$scope.by;
                }
                $scope.populate();
            };

            $scope.pageLimit = 10;
            $scope.currentPage = 1;
            Counter.query(function(count){
                $scope.totalItems = count.total;
                $scope.populate();
            });
        };

my question is for example in pending list. i checked some items and then 
click "OnHold" button it should re-initialize the On Hold Transactions 
listing. is it posible to fire some method from outside of the scope?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to