I'm trying to sort a list of products from highest to lowest. The file json has been uploaded to firebase. TypeError: Cannot read property 'query' of undefined thats the error i'm receiving. My model is called "product" and it has the price attribute Here is the code:
sortHigh: ['product.price'],
actions:{
sortHigh(product) {
sortedProducts: Ember.computed.sort('product', 'sortHigh')
return this.store.query('product').sortHigh('price');
}
}
HTML Highest Price
Aucun commentaire:
Enregistrer un commentaire