Tomas Trajan
1 min readFeb 25, 2020

--

Hi Marek!

Not sure if I get it but in general, I put reusable services in /core directory (and sub directories based on feature eg /core/auth or /core/user ) and I use providedIn: 'root' . So they are not in providers: [ ] of the CoreModule

Then they can be injected in any component or service in the whole app as they are application wide singletons.

Hope that makes sense!

--

--

Tomas Trajan
Tomas Trajan

Written by Tomas Trajan

👋 I build, teach, write & speak about #Angular & #NgRx for enterprises 👨‍💻 Google Developer Expert #GDE 👨‍🏫 @AngularZurich meetup co-organizer

Responses (1)