The test.mdoule.ts page created automatically!


Hello all,

im trying to learn ionic 2 , i did runt his command : ionic start newapp --v2 (( this suppose to create ionic 2 project ))

then when i create a new page using : ionic generate page new-page
then a folder will be created, one of the files is new-page.modul.ts which maks issue for me and when i delete it and try to serve the project again i get an issue which shown in the screen shoot uploaded with this topic


There is a bug with the CLI (you dont need the --v2 tag anymore)
Go inside your pageName.module.ts file and replace the IonicModule by IonicPageModule

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { HelloWorld } from './hello-world';

  declarations: [
    HelloWorld ,
  imports: [
  exports: [
export class HelloWorldModule {}


Or just delete that module.ts file, take the @IonicPage decorator off your page component, and declare it as an entry component in your app module.