ember-cli-pagination icon indicating copy to clipboard operation
ember-cli-pagination copied to clipboard

Error while processing route in LocalStore scenario

Open cmonzon44 opened this issue 9 years ago • 0 comments

well its that when i put the code in my controller i see that in console:

Error while processing route: cars this.get(...) is null objsForPage@http://localhost:4200/assets/vend ...

this is my controller:


import Ember from 'ember';
import pagedArray from 'ember-cli-pagination/computed/paged-array';

export default Ember.Controller.extend({

  // setup our query params

  queryParams: ["page", "perPage"],

  // set default values, can cause problems if left out
  // if value matches default, it won't display in the URL
  page: 1,
  perPage: 10,

  // can be called anything, I've called it pagedContent
  // remember to iterate over pagedContent in your template
  pagedContent: pagedArray('car', {pageBinding: "page", perPageBinding: "perPage"}),

  // binding the property on the paged array
  // to a property on the controller
  totalPagesBinding: "pagedContent.totalPages"
});

in my car route:

import Ember from 'ember';

export default Ember.Route.extend( {
    model() {
        return this.get('store').findAll('car');
    }
});

whats is wrong? thanks

cmonzon44 avatar Mar 13 '16 23:03 cmonzon44