| |
@@ -1,8 +1,8 @@
|
| |
- import { Component } from '@angular/core';
|
| |
+ import { Component, ViewChild } from '@angular/core';
|
| |
|
| |
import { Browser } from '../../providers/browser/browser';
|
| |
import { NotificationsPage } from '../../pages/notifications/notifications';
|
| |
- import { NavController, ActionSheetController, ToastController } from 'ionic-angular';
|
| |
+ import { NavController, ActionSheetController, ToastController, Content } from 'ionic-angular';
|
| |
import { WordPressBlogProvider, Blog, BlogPost, BLOG } from '../../providers/word-press-blog/word-press-blog';
|
| |
import { merge } from 'rxjs/observable/merge';
|
| |
import { beautifyDate } from '../../utils';
|
| |
@@ -15,7 +15,7 @@
|
| |
providers: [WordPressBlogProvider],
|
| |
})
|
| |
export class MagazinePage {
|
| |
-
|
| |
+ @ViewChild(Content) content: Content;
|
| |
/**
|
| |
* List of posts from Fedora Magazine
|
| |
*/
|
| |
@@ -59,6 +59,12 @@
|
| |
ngOnInit() {
|
| |
this.updateCachedPosts();
|
| |
}
|
| |
+ /*
|
| |
+ Scroll to Top Method
|
| |
+ */
|
| |
+ scrollToTop() {
|
| |
+ this.content.scrollToTop();
|
| |
+ }
|
| |
|
| |
/**
|
| |
* Fetch latest posts from Fedora Magazine API
|
| |
This PR is regarding issue #136. Kindly review it @amitosh.