From 995de58e8dc23d175b55e6d3ebb49d3da07f489f Mon Sep 17 00:00:00 2001
From: Dmitry Nehaychik <4dmitr@gmail.com>
Date: Mon, 22 Oct 2018 13:58:43 +0300
Subject: [PATCH] fix(auth): don't import http module (#919)
Closes #631
---
docs/articles/auth-install.md | 18 ++++++++++++++++++
src/framework/auth/auth.module.ts | 3 +--
2 files changed, 19 insertions(+), 2 deletions(-)
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,