Git Product home page Git Product logo

Comments (8)

ESimmonds avatar ESimmonds commented on August 23, 2024 4

works if the pipe is stateful

@Pipe({
  name: 'orderBy',
  pure: false
})

from ngx-order-pipe.

VadimDez avatar VadimDez commented on August 23, 2024 2

Fixed in latest version 1.1.0 of ngx-order-pipe.

Thanks @ESimmonds for pointing that out.

from ngx-order-pipe.

VadimDez avatar VadimDez commented on August 23, 2024

orderBy is applied right after array in *ngFor is changed

from ngx-order-pipe.

kkamalesh avatar kkamalesh commented on August 23, 2024

Hi i used the below code after installing the Ng2OrderModule.but its not ordering the list by the type field.what i am doing wrong please let me know.

<div *ngFor="let favorite of favoriteReports | orderBy: 'favorite.type'" title="{{favorite.title}}" class="row-striped">
  <a [routerLink]="['/report/documentList',{reportId:favorite.id}]"
     *ngIf="favorite.type=='Report'" (click)="selectFavorite(favorite,$event)">
    <i class="fa fa-file-text"></i>&nbsp; {{favorite.title}}</a>
  <a [routerLink]="['/report/', favorite.folderPathId]" *ngIf="favorite.type!='Report'"
     (click)="selectFavorite(favorite,$event)">
    <i class="fa fa-folder-open"></i>&nbsp; {{favorite.title}}</a>
</div>

from ngx-order-pipe.

VadimDez avatar VadimDez commented on August 23, 2024

Try to install ngx-order-pipe (see installation and usage in the documentation) instead of ng2-order-pipe.

from ngx-order-pipe.

DigitalMystery avatar DigitalMystery commented on August 23, 2024

The refresh is not working for me either.

*ngFor="let myItem of myObject.myItems | orderBy: 'itemOrder'"

itemOrder is a property off myItem. I had to add the ticks ' for it to work as well which I did not see in the example.

from ngx-order-pipe.

JavanXD avatar JavanXD commented on August 23, 2024

@VadimDez
The refresh is not working for me either.
<li *ngFor="let address of addresses | orderBy:'validFrom':true; let i = index">
validFrom is a prop of address and the type is Date.
After adding an address to addresses and also changing the value of a validFrom the list does not reorder as expected.

from ngx-order-pipe.

ESimmonds avatar ESimmonds commented on August 23, 2024

Thanks @VadimDez

from ngx-order-pipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.