I am attempting to write a service for angular and would like to perform a function inside my service each time I inject it into something else (in this case, to keep track of certain data that will be unique to each controller/service/whatnot that uses the service). I am attempting to run through documentation on angular's injector, but cannot tell if it is actually possible to run a function on injection (or to run something after you've left the scope that you were injected into).
Is this remotely possible? If so, how?