16
我爲我的angularjs項目創建了一個自定義過濾器,類似於以下小提琴http://jsfiddle.net/tUyyx/。Angularjs過濾器錯誤:「錯誤:未知提供者:textProvider」
但是當我使用的過濾器,我收到以下錯誤
Error: Unknown provider: textProvider <- text <- truncateFilter
at Error (<anonymous>)
at http://localhost/javascripts/lib/angular.min.js:28:236
at Object.c [as get] (http://localhost/javascripts/lib/angular.min.js:26:13)
at http://localhost/javascripts/lib/angular.min.js:28:317
at c (http://localhost/javascripts/lib/angular.min.js:26:13)
at Object.d [as invoke] (http://localhost/javascripts/lib/angular.min.js:26:147)
at http://localhost/javascripts/lib/angular.min.js:28:335
at Object.c [as get] (http://localhost/javascripts/lib/angular.min.js:26:13)
at http://localhost/javascripts/lib/angular.min.js:99:481
at o (http://localhost/javascripts/lib/angular.min.js:66:471)
我創建了我的模塊是這樣。
var myapp = angular.module('myapp', ['ngResource']);
我在做什麼錯?