You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I bumped into this project while I was looking for an example app that is following the official Angular styleguide.
I see that you are trying to follow the guidelines, but there is one thing, which is against it. Specifically against this point: Avoid providing services in shared modules. Services are usually singletons that are provided once for the entire application or in a particular feature module.
Is it intentional that you have the src/app/shared/services/ folder, and services in it, which are used throughout the app?
According to the Angular styleguide, it should be placed under src/app/core.
Thanks,
Norbert
The text was updated successfully, but these errors were encountered:
Thank you for the modification, now it seems better :)
Yes, I agree, that in some cases it's needed, but it will be usually coming from one of the components.
In this example, it's the HeroService, that is placed in the app/heroes/shared, indicating it's a shared service, but belongs to the Hero component. And it is imported in the SharedModule as a global provider, to make it available for everyone.
Hi!
I bumped into this project while I was looking for an example app that is following the official Angular styleguide.
I see that you are trying to follow the guidelines, but there is one thing, which is against it. Specifically against this point:
Avoid providing services in shared modules. Services are usually singletons that are provided once for the entire application or in a particular feature module.
Is it intentional that you have the
src/app/shared/services/
folder, and services in it, which are used throughout the app?According to the Angular styleguide, it should be placed under
src/app/core
.Thanks,
Norbert
The text was updated successfully, but these errors were encountered: