Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OrderPipe as provider in the OrderModule #48

Closed
VadimDez opened this issue Feb 14, 2018 · 4 comments
Closed

Add OrderPipe as provider in the OrderModule #48

VadimDez opened this issue Feb 14, 2018 · 4 comments
Assignees
Milestone

Comments

@VadimDez
Copy link
Owner

No description provided.

@VadimDez VadimDez self-assigned this Feb 14, 2018
@VadimDez VadimDez added this to the 1.2.1 milestone Feb 14, 2018
VadimDez added a commit that referenced this issue Feb 14, 2018
VadimDez added a commit that referenced this issue Feb 14, 2018
@siordache94
Copy link

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

@VadimDez
Copy link
Owner Author

@siordache94
Copy link

Yea, I find it insufficient, what is this.order?
I'm getting the error: expression.indexOf is not a function

@VadimDez
Copy link
Owner Author

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';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants