coldfusion - AngularJS filtering causes circular dependency error when using pagination -


this how load data

// loads entire list of metriclibs.  function homectrl($scope, $http, $location) {     $scope.data = [];     $scope.pagesize = 100;     $scope.currentpage = 0;     $scope.lastpage = 0;   // async $http.get('index.cfm/json/metriclib')     .success(function(data) {          $scope.data = data;          $scope.lastpage = math.floor($scope.data.length/$scope.pagesize);         })     .error(function(data) {          console.log("data load error");         })           ;  $scope.go = function ( path ) {     $location.path( path );     };   $scope.numberofpages=function(){     return $scope.lastpage;                     } 

}

this how show data without pagination (this works)

<tr ng-repeat="datum in data | filter:search  | limitto:pagesize" class="odd"> 

this me thing set starting point

<tr ng-repeat="datum in data   | startfrom:0 | limitto:pagesize" class="odd"> 

when second 1 get:

[19:58:24.355] "error: circular dependency:  getservice@http://xxxxxxxx/toolbox_hacking/assets/angular.js:2855 @http://xxxxxxxx/toolbox_hacking/assets/angular.js:9604 filter@http://xxxxxxxx/toolbox_hacking/assets/angular.js:6157 _filterchain@http://xxxxxxxx/toolbox_hacking/assets/angular.js:6148 statements@http://xxxxxxxx/toolbox_hacking/assets/angular.js:6124 parser@http://xxxxxxxx/toolbox_hacking/assets/angular.js:6057 @http://xxxxxxxx/toolbox_hacking/assets/angular.js:6623 scope.prototype.$eval@http://xxxxxxxx/toolbox_hacking/assets/angular.js:8057 ngrepeatwatch@http://xxxxxxxx/toolbox_hacking/assets/angular.js:13658 scope.prototype.$digest@http://xxxxxxxx/toolbox_hacking/assets/angular.js:7935 scope.prototype.$apply@http://xxxxxxxx/toolbox_hacking/assets/angular.js:8143 done@http://xxxxxxxx/toolbox_hacking/assets/angular.js:9170 completerequest@http://xxxxxxxx/toolbox_hacking/assets/angular.js:9333 createhttpbackend/</xhr.onreadystatechange@http://xxxxxxxx/toolbox_hacking/assets/angular.js:9304 

it turns out controller.js had

var home = angular.module("home", []); 

in addition

app.js having

var home = angular.module("home", []); 

controller.js wiped our customer filters


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -