【发布时间】:2019-01-14 20:39:05
【问题描述】:
我有一份来自 API 的结果项目列表。 在我看来,我用 ng-repeat 呈现了这个结果。
<div ng-repeat="item in items"></div>
这是我的 API 回复。
2017-01-17T09:35:38.429Z
2017-01-03T10:00:00.000Z
2017-01-27T14:34:55.179Z
我需要按日期过滤,即如果项目超过 3 个月的显示。
【问题讨论】:
-
if the items are more than 3 months old show- 这是过滤,不是排序... -
感谢罗伊的帮助!!
-
你能帮我解决这个问题吗?
-
这里有很好的例子:
https://www.w3schools.com/angular/ng_filter_orderby.asp和这里https://www.w3schools.com/angular/angular_filters.asp