This new file module is for lazy loading (which from my point of view has greatly improved performance).
If you do not want to use lazy loading and continue with the ionic as it was just delete this module file and in your HTML delete the @IonicPage
selector that it also places, then you do your routine to add the page in app.modules.ts
and follow life.
If you want to leave the file and do lazy loading, do the following:
Leave your file paginaNova.module.ts
like this:
import { NgModule } from '@angular/core';
import { NovaPagina} from './NovaPagina';
import { IonicPageModule } from 'ionic-angular'; // ele cria com IonicModule e isso da erro, tem que ser IonicPageModule
@NgModule({
declarations: [NovaPagina],
imports: [IonicPageModule.forChild(NovaPagina)],
exports: [NovaPagina]
})
export class NovaPaginaModule { } //tem que ser assim: nomeDaPaginaModule
You do not need to import this page into your app.module.ts
and pages when calling this new page, just use its name inside quotation marks, then a new page push that was
import { NovaPagina } from '../novaPagina';
mInhaFuncao(){
this.navCtrl.push(NovaPagina);
}
It becomes
mInhaFuncao(){ // Não precisa mais importar a página.
this.navCtrl.push("NovaPagina");
}
Do this for all pages of the project and be happy, just create a module for home page and import IonicPage
into pagina.ts
and put it under @Component. It's a little work, but it's worth it.
I hope I have helped: D