title: service that runs at angular app instance creation regardless of inital router endpoint
body: <p>I have an authentication service that I want run on app instance creation. Im not sure how to do this. </p>
  
  <p>One of the many things that this service will do is check if localstorage contains a JWT (I am using a angular app so I am protected from xss) and if it does, grabs the sign in permissions and info from the server. </p>
  
  <p>I want this service to run regardless of where my inital route point is.</p>
  
  <p>so it works at </p>
  
  <p>root</p>
  
  <p>and </p>
  
  <p>root/totally/awesome/route/point</p>
  
  <p>make sense? I'm asking this question because I honestly have no clue. I am currently checking the <code>life cycle hooks</code> </p>
  
  <p>So no lifecycle hooks to use: </p>
  
  <p>does the app component run on app instance regardless of the view currently navigated to? If so I think I could just do a <code>ngOnInit</code> lifecycle hook in the app component and inject the service app wide with the providers array.</p>
  
  <p>so it seems I need to take the <code>app.component.ts</code> file and add a constructor and <code>ngOnInit</code> lifecycle hook that will check the authorization service. and do the necessary work needed to log a user in and display the relevant permissions</p>