-
-
Save amandeepmittal/4eb3db8e5346f05129b5d11688956905 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 { Page2Page } from "../page2/page2"; | |
@IonicPage() | |
@Component({ | |
selector: 'page-page1', | |
templateUrl: 'page1.html', | |
}) | |
export class Page1Page { | |
constructor(public navCtrl: NavController, public navParams: NavParams) { | |
} | |
goTo(page) { | |
if(page === 'page2') { | |
this.navCtrl.push(Page2Page); | |
} | |
} | |
back() { | |
if(this.navCtrl.length() >= 2) { | |
this.navCtrl.pop(); | |
} | |
} | |
ionViewDidLoad() { | |
console.log('ionViewDidLoad Page1Page'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment