Need to access service in function
问题 I have a service (AuthService) that I need to access in my restangularInit function (in my app.module.ts) but I don't know how, I can't get access to it. I have tried to move it to the class AppModule but by then it´s to late. Calling the service functions eg. getToken works as expected. import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import {