Angular 2 - Sort list from Observable
<p>What is the best way to <code>sort</code> a list of items coming from an <code>Observable</code> and still be able to use the <code>async pipe</code>? (I read that making a custom sort pipe is not really efficient.) I want to avoid subscribing and keeping a local copy of data and thus just using async pipe...</p>

<pre><code>//can I use map here and filter items right in the observable and get rid of subscribe?

this.test$ = Observable.of(['one', 'two', 'three'])
    .subscribe((data) =&gt; {
        data.sort((a, b) =&gt; {
            return a &lt; b ? -1 : 1;
         });
        this.data = data;
     });
</code></pre>

<p>template:</p>

<pre><code>&lt;div *ngFor='let item of data'&gt;
&lt;!-- want to be able to use async pipe here --&gt;
</code></pre>