Всем привет. Подскажите как правильно установить ember-cli-pagination, что бы он работал.
У меня есть роут:
export default Ember.Route.extend({
controller: null,
setupController:function(controller, model) {
this._super(controller, model);
this.set('controller',controller );
controller.getData()
},
beforeModel: function() {},
perPage: 25,
model: function(params) {
return App.New.create({
statuses:[
{id:1, text: "purpose of courier"},
{id:2, text: "Courier Appointed"},
{id:3, text: "On the way to the restaurant"},
{id:4, text: "Arrived at the restaurant"},
{id:5, text: "On the way to the customer"},
{id:6, text: "Arrived to the customer"},
{id:7, text: "Fulfilled"},
{id:8, text: "Canceled"},
{id:9, text: "Removed"}
],
loaderMain:false,
result: [],
count: 0
});
},
afterModel: function () {
//this.refresh();
}
});
Есть шаблон:
{{#each model.result as |order index|}}
....
{{/each}}
{{page-numbers content=model.result}}
Как "заставить" его работать с параметром model.result в данном случае?
Как изменить код так, что бы по клику на след страницу вызывать controller.getData() ?
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости