Ionic time sorting


#1

Could you help me? how can i sort by time?

        <ion-row *ngFor="let item of d.content">
          <ion-col col-2>

            <div> <button ion-button block (click)="save()" >{{item.time}}</button></div>

          </ion-col>

          <ion-col col-6>
            <div> <button ion-button block (click)="zamanAraligi(item)">{{item.Name}}</button></div>
          </ion-col>
          <ion-col col>
              <div> <button ion-button block (click)="delete(item)" >sil</button></div>
          </ion-col>

        </ion-row>
      </ion-grid>

#2

Can be solved via a pipe that orders your elements.

See http://plnkr.co/BXkrPqeMYuJMhkx94i6M for an working example matching your requirements.

To use the pipe, you could modify your code to

<ion-row *ngFor="let item of d.content | orderByPipe">
    ...
</ion-row>