【发布时间】:2017-02-18 05:59:15
【问题描述】:
目前我正在开发用于管理锻炼的应用程序。我想按日期对锻炼进行排序。我的一次锻炼记录如下:
"title": "Running through the park",
"type": "Running",
"distance": "10",
"duration": [
{
"hours": "2"
},
{
"minutes": "40"
},
{
"seconds": "44"
}
],
"note": "Running in NY park."
我想按天对锻炼进行排序。例如:
09.10
正在运行
篮球
07.10
俯卧撑
足球
目前看起来是这样的:workouts-main screen
我的那个组件的 html 文件很简单:
<ion-list>
<ion-item *ngFor="let workout of workouts" (click)="workoutSelected($event,workout)">
{{workout.title}}
</ion-item>
最好的方法是什么?
【问题讨论】:
标签: json angular ionic-framework ionic2