When using latest Ionic CLI, its making module files. Why does it make a module file? Also, how do I properly register this module? What is the benefit of having a tab or page generated with a module file vs without? For example, when installing tabs default project(ionic start myApp tabs
) you don't get tabs with module files, and with the generator you do.
The purpose of the module files is lazy loading. You don't need to register it. It is a self-contained module file for the particular page.But if you don't need lazy loading then you can use this CLI for generating pages.
ionic generate page MyPage --no-module
Note: I highly suggest you to use Lazy loading
. It'll give huge performance boost to your app.
Here you can read more about lazy loading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With