In Angular 2 the injector creates a new instance of a service whenever it comes across the providers: [MyService]
property of a @Directive. Child components of the Directive don't have to pass the MyService to their providers, and the injector will use the first service of that type if find walking back up the component tree. That's my understanding of it anyway.
When debugging components it can be difficult (maybe not possible?) to determine at what point the service was created by looking at the Service properties. Is there any way to find this out at runtime? Maybe there is a property we can set in the Service constructor() that we could read when debugging?
For example, you could debug the service, and it would have property createAt:string which would have the "ComponentName"; That's what I'm trying to find out.