angularjs – 未知的提供者:groupByFilterProvider < - groupByFilter

前端之家收集整理的这篇文章主要介绍了angularjs – 未知的提供者:groupByFilterProvider < - groupByFilter前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个对象数组.我需要将数据分组一个字段,并将结果显示HTML表中.

输入:

@H_301_3@[ { id: "559e2bbc9a496034557d6d84",text: "Data Sources",topParentId: "559e2bbc9a496034557d6d84",topParentText: "Data Sources" },{ id: "559e2bbc9a496034557d6d83",text: "Applications",topParentId: "559e2bbc9a496034557d6d83",topParentText: "Applications" },{ id: "559e2bbc9a496034557d6d82",text: "Analytics",topParentText: "Applications" } ]

从这里我需要创建一个这样的HTML表(由topParentId分组数据):

@H_301_3@Group | Tags Data Sources | Data Sources Applications | Applications Analytics

到目前为止我已经做到了:

@H_301_3@<table class="table table-bordered"> <thead> <tr> <th>Group</th> <th>Tags</th> </tr > </thead> <tbody> <tr ng-repeat="tag in topic.tags | groupBy: 'topParentId'"> <td>{{tag.topParentText}}</td> </tr> <tr> <td>{{tag.text}}</td> </tr> </tbody> </table>

但运行此代码后,我将收到Unknown提供程序:groupByFilterProvider< - groupByFilter错误. 我使用AngularJs 1.2

由@jhadesdev orderBy提供的是开箱即​​用,但不是groupBy.
包含在 angular-filter
原文链接:https://www.f2er.com/angularjs/140664.html

猜你在找的Angularjs相关文章