Skip to content
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

My app stopped loading after installing @ng-idle #98

Open
zbeedatm opened this issue May 15, 2018 · 4 comments
Open

My app stopped loading after installing @ng-idle #98

zbeedatm opened this issue May 15, 2018 · 4 comments

Comments

@zbeedatm
Copy link

zbeedatm commented May 15, 2018

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior

Getting exception:

ERROR Error: StaticInjectorError(AppModule)[Keepalive -> HttpClient]:
StaticInjectorError(Platform: core)[Keepalive -> HttpClient]:
NullInjectorError: No provider for HttpClient!
at _NullInjector.webpackJsonp.../../../core/esm5/core.js._NullInjector.get (core.js:1003)
at resolveToken (core.js:1301)
at tryResolveToken (core.js:1243)
at StaticInjector.webpackJsonp.../../../core/esm5/core.js.StaticInjector.get (core.js:1111)
at resolveToken (core.js:1301)
at tryResolveToken (core.js:1243)
at StaticInjector.webpackJsonp.../../../core/esm5/core.js.StaticInjector.get (core.js:1111)
at resolveNgModuleDep (core.js:10896)
at _createClass (core.js:10933)
at _createProviderInstance$1 (core.js:10907)

Expected behavior

App should load as it was before installing this package

Minimal reproduction of the problem with instructions

Followed this example:
https://hackedbychinese.github.io/ng2-idle/
and tried to load app, but it failed.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Angular5 / Windows

  • @ng-idle version: 2.x
"ng-idle/core": "^2.0.0-beta.15",
"ng-idle/keepalive": "^2.0.0-beta.15",
"angular2-moment": "^1.9.0",
  • Angular version: 2.x

5.2.4

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

All

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    "typescript": "~2.4.2"

  • Node: node --version =

@zbeedatm
Copy link
Author

Solved by adding HttpClientModule to my app.module.ts

Pls update the example page with this instruction for angular5

@nabanita-
Copy link

Added HttpClientModule, even HttpModule in AppModule but still facing this error.

@sarikonduri
Copy link

Adding HttpClientModule/HttpModule did not help me. If there any solution?

@plisovyi
Copy link

@sarikonduri instruction on https://hackedbychinese.github.io/ng2-idle/ misses only adding HttpClientModule to root module's imports.
Here's it my StackBlitz example — https://stackblitz.com/edit/ng-idle-issue-98 — what's in instruction but with HttpClientModule.

If you need more assistance, please, try replicating your issue in StackBlitz, it would make helping easier.

@hackedbychinese I think this issue is resolved and can be closed, but instruction needs an update. Can you maybe point me at its source files so I can prepare pull request?

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

4 participants