Skip to content

Readme Clarification #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
djbeadle opened this issue Jun 25, 2018 · 2 comments
Closed

Readme Clarification #365

djbeadle opened this issue Jun 25, 2018 · 2 comments

Comments

@djbeadle
Copy link

Documentation Enhancement:

In the Readme's installation instructions, it doesn't mention anything about needing to import HttpClientModule and adding it to NgModule. Not always an issue because lots of projects already have it, but causes an unexpected error when starting from scratch.

Suggested change:

import { OAuthModule } from 'angular-oauth2-oidc';
import { HttpClientModule } from '@angular/common/http'; <--- Added
[...]

@NgModule({
  imports: [ 
    [...]
    HttpModule, <--- Added
    OAuthModule.forRoot()
  ],
  declarations: [
    AppComponent,
    HomeComponent,
    [...]
  ],
  bootstrap: [
    AppComponent 
  ]
})
export class AppModule {
}
@jeroenheijmans
Copy link
Collaborator

I ran into this issue as well when starting out with the library.

One thing though, shouldn't it be HttpClientModule in the imports?

@djbeadle
Copy link
Author

@jeroenheijmans Yes, I do believe you're right! Good catch.

jeroenheijmans added a commit to jeroenheijmans/angular-oauth2-oidc that referenced this issue Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants