Angular 2 (Ionic 2) call a function in a page when ever page is displayed
<p>When ever my home page in <strong><code>angular 2(ionic 2)</code></strong> app is loaded I want call service/function. How to achieve this?</p>
<p>For the first time when the app is loaded(home page is loaded) I can  write this in the <strong><code>constructor</code></strong>, but when user start using the app and <strong><code>push</code></strong> new pages into <strong><code>nav controller</code></strong> and <strong><code>pop</code></strong> them to come back to <strong><code>home page</code></strong>, the <strong><code>constructor</code></strong> wont get called again.</p>
<h3>I am stuck here.</h3>
<p>I would like to know what is the best way to achieve this feature?</p>
<p>I am new to <strong><code>angular2</code></strong> and <strong><code>ionic2</code></strong> <strong><code>framework</code></strong> (also don't have experiences in <strong><code>angular1</code></strong> and <strong><code>ionic1</code></strong>), please help me out.</p>
<p>Many Many Thanks.</p>
<h1>update</h1>
<h2>sample code of what I tried, but didn't worked.</h2>
<pre><code>import {Page, NavController, Platform, Storage, SqlStorage} from 'ionic-angular';

@Page({
  templateUrl: 'build/pages/page1/page1.html'
})
export class Page1 {
    static get parameters(){
        return [[NavController],[Platform]];
    }
    ngOnInit() {
        console.log(&quot;Showing the first page!&quot;);
    }
    constructor(nav, platform){
        this.nav = nav;
        this.platform =  platform;
    }
}
</code></pre>