Why is a module created?


#1

Hi guys,
I have a question, when I’m in a project ( a v2 project ) and when I’m running the following command:

$ionic generate page quotes ( for example )
I find in my folder a quote.module.ts but don’t what it is for and if I remove it, the app doesn’t work anymore…
Why ??

Thanks for your answers.


#2

This is for the new lazy loading support. You can pass in strings to nav controller methods known as “deep linking” and the modules will get lazy loaded. You can feel free to delete the modules and add your components to the root module as well.

navCtrl.push('QuotesPage') // will now be lazy loaded automatically

#3

Hmmmmm, I’m not quite sure that I understood everything but doesn’t matter, I gonna use the old ways :wink:
thanks