4

I'm kinda new on Ionic and I'm currently using Ionic CLI 5.4.15 and @ionic/angular 4.11.10.

When I want to generate new page, each page is now automatically creating an associated routing-module.ts and I was wondering if it was possible to disable this new functionnality.

Exemple :

C:\Users\Stagiaire\wIonic\Mango>ionic generate
? What would you like to generate? page
? Name/path of page: home
> ng.cmd generate page home
CREATE src/app/home/home-routing.module.ts (339 bytes)
CREATE src/app/home/home.module.ts (458 bytes)
CREATE src/app/home/home.page.html (123 bytes)
CREATE src/app/home/home.page.spec.ts (633 bytes)
CREATE src/app/home/home.page.ts (248 bytes)
CREATE src/app/home/home.page.scss (0 bytes)
UPDATE src/app/app-routing.module.ts (526 bytes)
[OK] Generated page!

As you can see the home-routing.module.ts is auto generated and I would like to disable this.

Thank you for your help.

Mhystos
  • 51
  • 1
  • Where is your problem if you keep it? – Mostafa Harb Jan 28 '20 at 09:46
  • Well I don't need a routing-module on every pages and If I create 20 pages It's annoying to delete the file and the link auto created in the page module aswell. – Mhystos Jan 28 '20 at 09:49
  • In prev ionic version , you could write in the console --no-module to remove the module from creation, but for routing till now there is no such thing, you should make the proccess manually. – Mostafa Harb Jan 28 '20 at 10:35

0 Answers0