Ionic 2 Error: Uncaught (in promise): invalid views to insert


#1

Hey community

I am getting an error i cant seem to find much ionic2 help on please assist - a couple of people have this error.

home.ts
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { registerPage } from ‘…/register/register’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {

constructor(public navCtrl: NavController) {

}
nextPage(){
this.navCtrl.push(registerPage);
}

}

home.html button
<button ion-button block outline color=“light” (click)=“nextPage();”>
Log in


#2

Are you sure it is registerPage and not RegisterPage and did you add it to your app.module.ts declaration and entryComponents arrays?