Commit ee6a9002e842cafb7b45b6a9e3fe3de21fd1b879
1 parent
30411d64
Exists in
master
and in
1 other branch
Fix blog pagination
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/app/components/noosfero-articles/blog/blog.component.ts
@@ -12,7 +12,7 @@ export class NoosferoArticleBlog { | @@ -12,7 +12,7 @@ export class NoosferoArticleBlog { | ||
12 | @Input() profile; | 12 | @Input() profile; |
13 | 13 | ||
14 | private posts: any[]; | 14 | private posts: any[]; |
15 | - private perPage: number; | 15 | + private perPage: number = 3; |
16 | private currentPage: number; | 16 | private currentPage: number; |
17 | private totalPosts: number = 0; | 17 | private totalPosts: number = 0; |
18 | 18 | ||
@@ -20,6 +20,10 @@ export class NoosferoArticleBlog { | @@ -20,6 +20,10 @@ export class NoosferoArticleBlog { | ||
20 | } | 20 | } |
21 | 21 | ||
22 | ngOnInit() { | 22 | ngOnInit() { |
23 | + this.loadPage(); | ||
24 | + } | ||
25 | + | ||
26 | + loadPage() { | ||
23 | this.noosfero.articles.one(this.article.id).customGET("children", { | 27 | this.noosfero.articles.one(this.article.id).customGET("children", { |
24 | content_type: "TinyMceArticle", | 28 | content_type: "TinyMceArticle", |
25 | per_page: this.perPage, | 29 | per_page: this.perPage, |