I need to navigate from the side menu to a new page.
The side menu code is
<ion-item nav-clear (click)="who()">
<img src="assets/imgs/who.png" width="30" /> <span style="font-size: 20px;">Who Are We?</span> </ion-item>
In the app.componenet.ts file , the method is
who()
{this.nav.push('ChooseStatePage');}
The choose-state.module.ts page is
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ChooseStatePage } from './choose-state';
@NgModule({
declarations: [
ChooseStatePage,
],
imports: [
IonicPageModule.forChild(ChooseStatePage),
],
})
export class ChooseStatePageModule {}
while the choose-state.ts page is
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-choose-state',
templateUrl: 'choose-state.html',
})
export class ChooseStatePage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad ChooseStatePage');
}
}
However when i click on the menu item i get an ‘Invalid Link Error’, how can i resolve it?..thanks