Commit ee6a9002e842cafb7b45b6a9e3fe3de21fd1b879
1 parent
30411d64
Exists in
master
and in
35 other branches
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 | 12 | @Input() profile; |
| 13 | 13 | |
| 14 | 14 | private posts: any[]; |
| 15 | - private perPage: number; | |
| 15 | + private perPage: number = 3; | |
| 16 | 16 | private currentPage: number; |
| 17 | 17 | private totalPosts: number = 0; |
| 18 | 18 | |
| ... | ... | @@ -20,6 +20,10 @@ export class NoosferoArticleBlog { |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | ngOnInit() { |
| 23 | + this.loadPage(); | |
| 24 | + } | |
| 25 | + | |
| 26 | + loadPage() { | |
| 23 | 27 | this.noosfero.articles.one(this.article.id).customGET("children", { |
| 24 | 28 | content_type: "TinyMceArticle", |
| 25 | 29 | per_page: this.perPage, | ... | ... |