Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49362

Time wise sorting

$
0
0

@dipankar123 wrote:

hi all,
how to short my list time wise accending/ decending order

i have array like this:

this.array= [
    {name: A, time: 10:00am},
    {name: b, time: 10:05am},
    {name: c, time: 10:02am},
    {name: e, time: 09:00am}
]

in html:

<div *ngFor="let item of array">
  <span style="float: left">{{item.time}}</span>
  <span style="float: right">{{item.name}}</span>
</div>

i want to show this array time wise acceding order like:

this.array= [
    {name: e, time: 09:00am},
    {name: A, time: 10:00am},
    {name: c, time: 10:02am},
    {name: b, time: 10:05am},
]

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49362

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>