April 2017
Beginner to intermediate
378 pages
7h 57m
English
Ionic Page decorator helps implement deep linking better. If you remember our navigation example from Chapter 4, Ionic Decorators and Services, we have referred to actual class names while pushing and popping pages using the Nav Controller.
I am referring to example9/src/pages/home/home.ts here:
import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { AboutPage } from '../about/about'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { constructor(public navCtrl: NavController) {} openAbout(){ this.navCtrl.push(AboutPage); } }
We can implement the same using the @IonicPage decorator, as shown.
Let's update example9/src/pages/about/about.ts ...
Read now
Unlock full access