在Angular Filter上获取错误 - Function.prototype.toString不是通用的

时间:2017-03-21 14:11:40

标签: angularjs prototype angular-filters

我有函数A的对象,它具有原型函数。

我正在尝试在ctrl文件中使用filterFilter。我收到了以下错误

TypeError: Function.prototype.toString is not generic
at Franchise.toString (<anonymous>)
at comparator (../bower_components/angular/angular.js:18856:29)
at deepCompare (../bower_components/angular/angular.js:18911:16)
at deepCompare (../bower_components/angular/angular.js:18895:47)
at deepCompare (../bower_components/angular/angular.js:18891:42)
at predicateFn (../bower_components/angular/angular.js:18866:12)
at Array.filter (native)
at ../bower_components/angular/angular.js:18830:35

我的过滤器代码 -

searchQuery = {'taluka': 'someval'};
lookupList = [{
                   deliveryDetails: {taluka: 'someval'}
             }];
return filterFilter(lookupList, searchQuery);

1 个答案:

答案 0 :(得分:0)

我的坏......我在不知不觉中将Franchise原型的原型改写成了别的东西。我纠正了它并且有效...