从数组angularjs过滤数据 [英] Filter data from array angularjs
问题描述
问候......
我的$ scope.SelectedData []
Greetings ...
I have a folowing in my $scope.SelectedData[]
[{"groupGuid":"d20ab30b-977e-4641-affb-878b45d753da","groupName":"Kicked","Start":8000,"End":8999,"assignedToUserName":"Admin","errors":{"assignedToUserName":null}}]
现在我想过滤数组数据并只得到这些值:
groupName,Start,assignedToUserName和Stop ...
并在以后的fase中将这些添加到ng-grid ....
这应该仅在Controller中没有搜索框中进行。
怎么做?
Thnx帮助我出去了!
我的尝试:
Wiki,论坛,angularJS网站等...................
Now i want to filter array data and get only these values :
groupName, Start, assignedToUserName and Stop ...
And add these to ng-grid in later fase ....
This should be done only in Controller no search box in view.
How to do that?
Thnx for helping me out!
What I have tried:
Wiki , forums , angularJS site etc...................
推荐答案
scope.SelectedData []
scope.SelectedData[]
[{"groupGuid":"d20ab30b-977e-4641-affb-878b45d753da","groupName":"Kicked","Start":8000,"End":8999,"assignedToUserName":"Admin","errors":{"assignedToUserName":null}}]
现在我想过滤数组数据并只得到这些值:
groupName,Start,assignedToUserName和Stop ...
并在以后的fase中将这些添加到ng-grid ....
这应该只能在控制器中查看。搜索框中没有搜索框。
怎么做?
Thnx帮助我!
我尝试过的事情:
Wiki,论坛,angularJS网站等...................
Now i want to filter array data and get only these values :
groupName, Start, assignedToUserName and Stop ...
And add these to ng-grid in later fase ....
This should be done only in Controller no search box in view.
How to do that?
Thnx for helping me out!
What I have tried:
Wiki , forums , angularJS site etc...................
您需要的模块是
过滤器。它是原生角度所以你只需要将它包含在你的控制器插页中:
filter. It's in the native angular so you only need to include it in your controller inserts:
myApp.controller('myController',['
这篇关于从数组angularjs过滤数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!