How to use (click) to change page?


#1

I have a div with a background-image, I used : (click)="onClick() and then in my .ts page I can use console.log(‘clicked’) to check if it works.

But I would like to change page when it clicks, someone know how to do it ?

Thank you


#2

NavController is what you are after.

import {NavController} from ‘ionic-angular’;

constructor(public navCtrl: NavController…){}

onClick() {
this.navCtrl.push(‘what-ever-page’);
}


#3

Great!! Thank you !!