How to sort a list that is held as an Observable (RxJS, Angular 2)

Viewed 8214

I am new to both Angular2 and RxJS.

I have set up a http service that essentially return to me an 'Observable'.

I am saving the Observable in a variable called items items : Observable.

My template (right now) just displays the contents

<ul>
    <li *ngFor="#item in items | async>{{item.name}} | {{item.group}}</li>
</ul>

This much works well.

I am now in the position where I want to sort my items - by name or group based on a click handler. However, I see no way to sort the array that is held within the Observable.

Any help is appreciated.

Thanks.

1 Answers
Related