title: Angular 5: Using Service from inside Custom Decorator Function
body: <p>I'm creating a <code>@Log()</code> Decorator Function for debugging purposes;</p>
  
  <p>I want that Decorator to delegate some of it's logic to a <code>LoggingService</code> that in turn depends on other services from the app...</p>
  
  <p>I've been trying a lot of different things, the simplest/most straightforward way was to cache the Main (or Shared) Module's Injector as a static prop on the module itself (see StackBlitz example linked below), and that works for lazy-loaded modules, but not for eagerly loaded ones...</p>
  
  <p>Non-working poc: <a href="https://stackblitz.com/edit/angular-j1bpvx?file=app%2Fdecorator.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-j1bpvx?file=app%2Fdecorator.ts</a></p>
  
  <p>Is there a way I could mkae use of that Service in there??</p>
  
  <p>Thanks!</p>