angular - Should I use mongoose sort or pipes to implement my own? -
sort features not included in angular 2. can use mongoose sort , working in shopping-cart application. should use pipes instead? drawbacks? still new angular 2 , mean stack. thanks.
i used both pipes , mongoose queries in application. sort category(ele, sh, vid)
while product
component sorts searched products alphabetically mongoose @ oninit()
.
<div [ngclass]="displaycategory"> <ul *ngfor="let category of categories | order by: ['fieldname'];let i=index"> <div class="checkbox"> <input type="checkbox" value={category.selected}} [ngmodel]="category.selected" (change)="oncategory($event,i)"> {{category.fieldname}}{{category.count()}}) </div> </ul> </div>
Comments
Post a Comment