diff --git a/docs/articles/auth-install.md b/docs/articles/auth-install.md index 3e746e3bb9..d785f64527 100644 --- a/docs/articles/auth-install.md +++ b/docs/articles/auth-install.md @@ -17,6 +17,24 @@ npm i @nebular/auth ```
+## HttpClientModule + +Auth module utilizes features of `HttpClientModule` and since it should only be imported in the root module, please make sure you've done this: + +```ts +import { HttpClientModule } from '@angular/common/http'; + +// ... + +@NgModule({ + imports: [ + HttpClientModule + ], +}) +export class AppModule { + +``` + ## Import Import the module and `NbPasswordAuthStrategy` strategy: diff --git a/src/framework/auth/auth.module.ts b/src/framework/auth/auth.module.ts index 7a03de5d39..a58553cd0d 100644 --- a/src/framework/auth/auth.module.ts +++ b/src/framework/auth/auth.module.ts @@ -2,7 +2,7 @@ import { Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule, HttpRequest } from '@angular/common/http'; +import { HttpRequest } from '@angular/common/http'; import { NbAlertModule, @@ -95,7 +95,6 @@ export function nbNoOpInterceptorFilter(req: HttpRequest): boolean { NbButtonModule, RouterModule.forChild(routes), FormsModule, - HttpClientModule, ], declarations: [ NbAuthComponent,