Skip to content

Instantly share code, notes, and snippets.

@frostyandy2k
Last active February 17, 2018 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frostyandy2k/f2bc99ae852770eba47b801e8c02cada to your computer and use it in GitHub Desktop.
Save frostyandy2k/f2bc99ae852770eba47b801e8c02cada to your computer and use it in GitHub Desktop.
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