[英]How to set filter for ng-repeat inside another ng-repeat with Angular.js
我想通过仅显示当前月份的结果来设置第二个ng-repeat的过滤器以与第一个ng-repeat一起处理。 bookings
和booking.monthDate
与month
类似
感谢您通过Angular.js帮助获得最佳实践
.dataContainer{"ng-repeat"=>"month in months"}
%h2
%span.monthResa {{month}}
.monthDetailContainer
.fiche-inner{"ng-repeat"=>"booking in bookings | filter: ??? "}
注意:此摘录在HAML中,但是没有关系,因为我使用了预比较器来获取.html
Angular非常聪明:)
booking in bookings | filter: month
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.