I was working on page navigation in Ionic. After using ionic serve
, I got this error:
The Page with .ts extension has a @IonicPage decorator, but
In your .ts page add the following code, replace the word 'name' with whatever you name your page. Don't forget to add your new page in the app.module.ts page.
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-name',
templateUrl: 'name.html',
})
export class NamePage {
constructor(public navCtrl: NavController) {
}
}