angularjs的controller中怎么调用其他的自定义的方法,以下代码为例

 $scope.getSalesInfoByOrder = function(typeName){
            salesService.getSalesInfoByOrder({params:{type:typeName}}).then(function(rs){
                console.log(rs);
                $scope.allList = rs.data;
                $scope.size = $scope.allList.length;
                $scope.saleList = getCurrentPageList($scope.pageInd);
            });
        };

$scope.getCurrentPageList = function(pageInd){
            var pageList = new Array();
            $scope.start = 50*$scope.pageInd + 1;
            $scope.end = 50*($scope.pageInd + 1);
            if($scope.allList.length < $scope.end){
                $scope.end = $scope.allList.length;
            }

正如上所示,同一个controller中定义了两个方法getSalesInfoByOrder和getCurrentPageList。但是在getSalesInfoByOrde方法中调用getCurrentPageList方法,却显示getCurrentPageList方法为定义,求解!

可以调用的,只是我在定义getCurrentPageList 时,它的后面还有方法。我忘记在getCurrentPageList 末尾加上封号了,因此报了undefined错误。

我想知道你的getCurrentPageList返回值是什么呢?