lundi 19 février 2018

Updating page number from service

I am trying to add the page number. for that I have a service so, from there accordingly i can update the page number.

But I am not able to achieve this. any one help me to get it done for me?

service:

import Ember from 'ember';

export default Ember.Service.extend({
  pageIndex:1,
  totalPages:2 //setting total page
});

Route:

model(){ //calling controller
    this.controllerFor(this.routeName).send('pageHandler');
  }

here is my live demo




Aucun commentaire:

Enregistrer un commentaire