vendredi 7 avril 2017

Could not find module `ember-infinity/mixins/route`

I am trying to Implement infinite-scrolling using ember-infinity. I have followed the documentation only but I am getting error "Could not find module ember-infinity/mixins/route" Below is my code

import Ember from 'ember';
import InfinityRoute from 'ember-infinity/mixins/route';

export default Ember.Route.extend(InfinityRoute,{
store: Ember.inject.service(),

model(){
    var inflector = Ember.Inflector.inflector;

    inflector.irregular('feed', 'feeds.php');
    inflector.uncountable('advice');
    let user = JSON.parse(localStorage.getItem('user'));
    let token = localStorage.getItem('token');
    if(user != null){
        //return this.get('store').query('feed',{page:1,userid:user.id,token:token});
        return this.infinityModel("feed", { perPage: 12, startingPage: 1,userid:user.id,token:token });
    }
} ,
actions:{
  getDetails(feed){
    console.log("Getting details of "+feed.id);
  }
}
});

Could you please tell me what is causing this error or any tutorial which can teach infinite-scrolling using ember js?




Aucun commentaire:

Enregistrer un commentaire