我在我的项目中使用过这个例子。 (这是groupBy: 'team'条款,我正试图让它工作)
有问题的依赖是角度过滤器
http://jsbin.com/weyov/45/edit?html,js,output
我的代码与链接示例的不同之处在于我正在引导角度模块,因此我遇到了喷射器错误。 (我试过用ng-filter )
var app = angular.module("announcements", ["ng-filter"]); app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);我相信我要在angular.module传递一些东西,但不知道它有什么价值。 请指教。
角度误差
I've used this example in my project. (It's the groupBy: 'team' clause that I'm trying to make it work)
The dependency in question is angular-filter
http://jsbin.com/weyov/45/edit?html,js,output
The difference in my code from the linked example is that I'm bootstrapping angular module so I'm getting injector errors. (I've tried to use ng-filter)
var app = angular.module("announcements", ["ng-filter"]); app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);I believe I've to pass something in the angular.module but not sure what value. Please advise.
Angular Error Page
最满意答案
你链接到这里的角度过滤器的模块有一个名为angular.filter的模块,而不是你帖子中的ng-filter 。 以下应该消除您的喷油器错误
var app = angular.module("announcements", ["angular.filter"]); //changed from ng-filter app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);The module you linked to here angular-filter has a module named angular.filter, not ng-filter like you have in your post. The following should get rid of your injector errors
var app = angular.module("announcements", ["angular.filter"]); //changed from ng-filter app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);与angular.module的角度过滤器相关性(Angular filter dependency with angular.module)我在我的项目中使用过这个例子。 (这是groupBy: 'team'条款,我正试图让它工作)
有问题的依赖是角度过滤器
http://jsbin.com/weyov/45/edit?html,js,output
我的代码与链接示例的不同之处在于我正在引导角度模块,因此我遇到了喷射器错误。 (我试过用ng-filter )
var app = angular.module("announcements", ["ng-filter"]); app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);我相信我要在angular.module传递一些东西,但不知道它有什么价值。 请指教。
角度误差
I've used this example in my project. (It's the groupBy: 'team' clause that I'm trying to make it work)
The dependency in question is angular-filter
http://jsbin.com/weyov/45/edit?html,js,output
The difference in my code from the linked example is that I'm bootstrapping angular module so I'm getting injector errors. (I've tried to use ng-filter)
var app = angular.module("announcements", ["ng-filter"]); app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);I believe I've to pass something in the angular.module but not sure what value. Please advise.
Angular Error Page
最满意答案
你链接到这里的角度过滤器的模块有一个名为angular.filter的模块,而不是你帖子中的ng-filter 。 以下应该消除您的喷油器错误
var app = angular.module("announcements", ["angular.filter"]); //changed from ng-filter app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);The module you linked to here angular-filter has a module named angular.filter, not ng-filter like you have in your post. The following should get rid of your injector errors
var app = angular.module("announcements", ["angular.filter"]); //changed from ng-filter app.controller("Controller", function($scope, $http) { }); angular.bootstrap(document.getElementById("announcements"), ["announcements"]);
发布评论