main
 1import Ember from 'ember';
 2
 3export default Ember.ArrayController.extend({
 4  page: 1,
 5  per_page: 18,
 6  queryParams: ['page', 'per_page'],
 7  actions: {
 8    more: function(){
 9      //this.incrementProperty('page');
10      this.incrementProperty('per_page', 18);
11      this.displayPage(this.get('page'), this.get('per_page'));
12    },
13  },
14  displayPage: function(page, perPage){
15    var that = this;
16    this.store.find('cake', { page: page, per_page: perPage }).then(function(cakes){
17      that.set('content', cakes);
18    });
19  }
20});