I am a beginner in ionic and I wanted to know how to properly structure my application (in src folder).
I use in my application a tabcontroller with 3 tabs, and with the Ionic creator, I have the following structure :
I use a variant of this. (My variation includes for example an Effects folder for ngrx effects. You might want/need to do something like that, depending on what libraries you use. But the material in the link is excellent.)
What is recommended by Angular Style Guide is actually different from ionic. For my project, since itβs managed by different people, I prefer to use the default folder structure specified by ionic.
For example, ionic generate provider http will create a HttpProvider in /providers/http/.
Hi, I know this is an old thread but this is the closest information I can find for my questions. I like this structure layout and if I get it, the βProvidersβ folder content would be in the βCoreβ folder. Going deeper in, how would you structure the individual providers? Letβs say I have a βServersListProviderβ that takes care of storing/maintaining the list of servers and another βServerProviderβ that takes care of interacting with the specific server via http/tcp/xstate/whatever. Would you keep them separate or would you put this all together as βServersProviderβ ?
I would make that call based on who injects them. If the same clients tend to inject both (or, from your description, perhaps ServersListProvider is pretty much internal and only injected by ServersProvider), I would house them together. If they have different clientele, I would separate them.
The ServersListView would need ServersListProvider to retrieve the stored list but would also need ServerProvider to retrieve the current reachable state of the server and show it in the list.
On the other hand, a ServerView would only need ServerProvider to communicate with a specific server to get some content.