Skip to content

Commit

Permalink
fix(auth): don't import http module (#919)
Browse files Browse the repository at this point in the history
Closes #631
  • Loading branch information
nnixaa authored Oct 22, 2018
1 parent 57fda28 commit 995de58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 18 additions & 0 deletions docs/articles/auth-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ npm i @nebular/auth
```
<hr>

## 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:
Expand Down
3 changes: 1 addition & 2 deletions src/framework/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -95,7 +95,6 @@ export function nbNoOpInterceptorFilter(req: HttpRequest<any>): boolean {
NbButtonModule,
RouterModule.forChild(routes),
FormsModule,
HttpClientModule,
],
declarations: [
NbAuthComponent,
Expand Down

0 comments on commit 995de58

Please sign in to comment.