Lazy Loading Invalid link error In Ionic 3

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" />&nbsp;&nbsp;&nbsp;<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

Hi, @greatakpo

could you please restart your project Ctrl+C and start ionic serve

I think when we integrate Lazy Loading Our project must be restart otherwise he gives an error like Invalid Link Error’

thanks

1 Like

It works after restarting the project as you directed. Thanks