update
This commit is contained in:
1 parent
261e842802
commit
0485a4acea
122 files changed
+4866
-3842
No files matched your search
@@ -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;
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user