Closed VadimDez closed 6 years ago
@siordache94 Here: https://github.com/VadimDez/ngx-order-pipe#use-orderpipe-in-the-component
Yea, I find it insufficient, what is this.order? I'm getting the error: expression.indexOf is not a function
See Usage part, there's an example component https://github.com/VadimDez/ngx-order-pipe#usage
you'll find order
there
import { Component } from '@angular/core';
@Component({
selector: 'example',
template: `
<ul>
<li *ngFor="let item of array | orderBy: order">
{{ item.name }}
</li>
</ul>
`
})
export class AppComponent {
array: any[] = [{ name: 'John'} , { name: 'Mary' }, { name: 'Adam' }];
order: string = 'name';
}
Hi, I can't seem to find an example for this usage. Can you please link me one? (Sorry if this is not the appropriate place to ask) Thank you