Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ionic 3 Navigation Type Script
/** ==========
Homepage TypeScript
========== **/
import { Component, ViewChild } from '@angular/core';
import { NavController } from "ionic-angular";
import { Page2 } from "../page2/page2";
@Component({
selector: "page-home",
templateUrl: "home.html"
})
export class HomePage {
//------
// this is the important part for working with the ionic stack
page2 = Page2;
//------
constructor(public navCtrl: NavController) {}
ionViewDidLoad() {}
}
/** ==========
Page2 TypeScript
========== **/
import { Component, ViewChild } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: "page-2",
templateUrl: "page2.html"
})
export class Page2 {
constructor(public navCtrl: NavController) {}
ionViewDidLoad() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment