使用AngularJS的过滤器,你如何在一个数组创建项目的一个子集?如何创建AngularJS
例如;从“todos”创建一个只包含“done:true”项目的新数组。
function fooController ($scope) {
$scope.todos = [
{text:'foo' , done:false},
{text:'foobar' , done:true},
{text:'foofoo' , done:false},
{text:'foobar2' , done:true}
]
}
http://docs.angularjs.org/api/ng.filter:filter
见约10:45 - >结束
好了,我在http://stackoverflow.com/questions/16394055/checkbox-list-breaks-why-and-optimal创建示例-angularjs路/ 16395257#16395257。 – timactive 2013-05-06 17:13:26