【发布时间】:2019-03-05 02:23:08
【问题描述】:
在我的 app.module.ts 中
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
MaterialModule,
FlexLayoutModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
MyAppModule
],
providers: [
AuthenticationService,
AuthGuardService,
MyAppService
],
bootstrap: [AppComponent]
})
export class AppModule { }
在我的 AuthGuardService 中:
@Injectable({
providedIn: 'root'
})
export class AuthGuardService implements CanActivate {
我已经将 HttpClientModule 甚至添加到我的 authguard 中,但我仍然遇到这个错误。我正在使用角度 7。
【问题讨论】:
标签: angular