Hello Ionic Developers, I’m using Ionic 3 for a work project. The project isn’t that large to say ( about 10 pages by now ).
I’ve been generating components, providers and pages using the CLI and have done all of the project the Ionic default way ( shared components module, all providers loaded from app.modules ), only the pages are lazy loaded.
The problem is that recently I found out that there is a separate team working on the project but slightly modified. Their tasks are mostly design related so they rely the logic on me, hence the fact that the other team has little experience with programming in Ionic.
So I thought id would be much better if I separate everything in modules, best way being a more react way of " separation of concerns ". Instead of having a components / pipes / providers / directives folders, everything that a specific page requires would be inside the page folder itself.
So instead of this
I would have something like this
locations page in this example will have all it’s own providers, pipes and components nested inside the locations folder, lazy loading them when the page is accessed.
The reason behind this logic is to ease the work of the other team thus not needing to explain which modules they need to copy and link to their components.modules or in app.modules. This way they only need to copy the specific page folder and link within other pages to that page.
A global components / pipes / providers would still exist for them so that existing pages wont be broken, but all new pages that I provide for them to modify would not require any outside modules ( if they do not exist ). I would still use global components in cases where they are already created and used within other pages ( for app size reasons ).
EDIT: all the providers, pipes, components inside the pages are heavily custom, so they wont be needed in any other pages, keeping each page as separate as it could be, their only link would be by the NavController.
My question would be if someone can explain how to do this or at least point me to some resources that I could learn to do this.
Thanks to all in advance for going thru all the post.