I’ve an issue. When I run ionic page command in ionic 2 blank project to create a new its creates 4 files.
For example if i run ionic g page about it makes a about folder containing 4 files
about.html
about.scss
about.ts
and the last one about.module.ts
Please guide me why this about.module.ts is being created
@williamdelvalle Thanks for replying. Can you please guide me about it more. coz my project is in ionic 2. and I’m not understanding its relation with ionic 3
I have the same problem The project is created with version 2. I have another project created last week and with the same function does not happen. It only happens with the creation of a new project. Thanks
Cordova CLI: Not installed
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.10.0
Xcode version: Not installed
One thing is surprized for me in it I’ve installed cordova if run cordova -v its telling me cordova version 6.5.0 but ionic info says Cordova CLI not installed
I’m not so sure about that. You have to decide whether you want in on the lazy page loading or not, and if you leave them there they will opt you in. Unless you’re convinced that it’s going to have a net beneficial impact, my current position is that it’s best to delete that file and remove the IonicPageModule decorator from pages.
@rapropos Agreed. For example, I’m in the middle of fully porting my project over to the latest Ionic code base and will be doing performance testing to see if all on only certain pages warrant lazy loading. Until that testing is done I can’t just generalise or simply ignore certain features / code.
In my experience, Angular 4 and ionic-native 3 on their own offer significant bundle size reductions (and corresponding startup time minimization). Lazy page loading, OTOH, is a rather mixed bag at the moment.
I’m sure there’s a compromise vs, balance vs. benefit at the moment. I’m sure it’ll all even out in the end. We just need to make intelligent, informed decisions on when to use which features as well as thoughtful application structure / design decisions. This can take time but I’ve found it’s saved me more time in the long run than it’s cost me.
I think a viable heuristic at the moment is as follows:
If all of your pages are truly completely independent of one another and the primary landing page is relatively light, lazy page loading might be worth looking into. If you have custom components that are shared by multiple pages or your landing page is relatively heavy compared to your other pages, it’s probably not recommended.
@mk0547 for more explanation, previously we add the page to app.module.ts, and import it when we need to navigate to it from some page… in ionic 3 you don’t need to do that even if your app is use ionic 2 you could just navigate to ionic 3 page by putting the page name as string like this
this.navCtrl.push(‘Registration’); // Registration is my new page using ionic 3 generated page
try to update cordova as @williamdelvalle said… it does work after updating cordova