When using @Injectable({providedIn: 'root'}) in Angular 7 for a service, the constructor of the service executes when exactly? Is it upon the creation of a component that utilizes it as a dependency or does it wait until a method within the service is called first?
Note: Given that the service acts as a singleton, I am currently utilizing the constructor of the service to initialize certain values. Although an alternative approach could involve creating an "Initialize()" method and invoking it within the component's constructor, I personally find this method somewhat messy.