This commit is contained in:
tmshv committed 2016-03-07 04:46:42 +03:00
1 parent 261e842802
commit 0485a4acea
122 files changed
+4866 -3842

No files matched your search

+9 -7
View File
@@ -3,18 +3,20 @@ import template from '../../templates/components/page-events.html';
export default function (app) {
app.component('pageEvents', {
bindings: {
events: '<'
posts: '<',
page: '@',
totalPages: '@'
},
template: template,
controllerAs: '$',
controller: function (api, menu) {
this.pageClass = 'page-events';
menu.activate('/events');
//api.event.list()
// .success(posts => {
// this.posts = posts;
// });
this.page = parseInt(this.page);
this.totalPages = parseInt(this.totalPages);
this.prevPage = this.page === 1 ? null : this.page - 1;
this.nextPage = this.page === this.totalPages ? null : this.page + 1;
}
});
};
};