On the official styleguide :https://angular.io/guide/styleguide#core-feature-module
they recommend using a SharedModule and CoreModule in an angular app.
I was wondering if it was a decent practise to use them as well on an Ionic app ?
On the official styleguide :https://angular.io/guide/styleguide#core-feature-module
they recommend using a SharedModule and CoreModule in an angular app.
I was wondering if it was a decent practise to use them as well on an Ionic app ?
That depends on your app, if you are doing a ToDo List app you probably don't need a CoreModule.
But if you have services that must be singleton instances and you have common components that must be used along the app, this module is where you probably need to register them.
As an example think in something like a 401 HTTP status response, you could trigger an EventBus (singleton) where your pages are subscribed and they will do something to handle that status in a generic way.
Why would it be any different ? What the angular team recommend is for any application type, be it a Ionic app or any other.
Will you need singleton services across your application ? Yes then you need something like a CoreModule to provide them and it's convenient.
Will you have shared components across several other modules ? Probably yes, like any other Angular application, so you need to have a SharedModule that will answer your needs.
Don't know, maybe it's not Ionic best practices? I cannot find this the super starter template (also referred as best practices)
https://github.com/ionic-team/starters/tree/master/ionic-angular/official/super