-
-
Save amandeepmittal/5b99ac8daa3b1d3cae7172268bf3e03d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
import { Page1Page } from "../page1/page1"; | |
@IonicPage() | |
@Component({ | |
selector: 'page-page2', | |
templateUrl: 'page2.html', | |
}) | |
export class Page2Page { | |
constructor(public navCtrl: NavController, public navParams: NavParams) { | |
} | |
goTo(page) { | |
if(page === 'page1') { | |
this.navCtrl.push(Page1Page); | |
} | |
} | |
back() { | |
if(this.navCtrl.length() >= 2) { | |
this.navCtrl.pop(); | |
} | |
} | |
ionViewDidLoad() { | |
console.log('ionViewDidLoad Page2Page'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment