Angulaire 2. Comment appliquer orderBy?

J'ai un morceau de code.

JS:

<table class="table table-bordered table-condensed" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Score</th>
        </tr>
    </thead>
    <tbody>
        <tr *ngFor="#participant of participants; #i = index">
            <td>{{i+1}}</td>
            <td>{{participant.username}}</td>
            <td>{{participant.score}}</td>
        </tr>
    </tbody>
</table>

Angulaire 1 j'ai orderBy filtre à lignes d'ordre par mon filtre. Mais comment puis-je faire orderBy Angulaire 2 de la même façon ? Merci.

InformationsquelleAutor Edward | 2016-02-17