-
Notifications
You must be signed in to change notification settings - Fork 52
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
No provider for InjectionToken DocumentToken! #3
Comments
Sorry, I think this issue still persists in 1.8.6. Can you look at it? This SO question and this github issue seem to related, maybe it's a problem with the library packaging? UPDATEI deleted the node_modules folder from the lib folder (node_modules/angular4-hal/node_modules), and it seemed to help. Can you elaborate lib packaging a bit? |
if you want get http client simply @Injectable() constructor(private externalService: ExternalService, injector: Injector) { .................. this.externalService.getHttp() |
what is your question? |
Thanks, I am able to access httpClient this way, so I removed the HttpClient injection from constructors and removed HttpClient from app.module providers and imports as well, but the problem still exists. I did everything as it's written in README.md, I just can't see what I am missing... |
please post your code entirely or post a plunker |
Please see this comment, this is exactly what I had to do to get it working (that's not a real solution though, because it redownloads node_modules directory again on an |
app.module.ts
project.service.ts
project.model.ts
project-list.component.ts
|
my angular version is 5.1.2 |
please zip a complete project for test |
Sorry, I can not post the original project, but I generated a fresh new project with Angular-CLI, added a simple service and model entity. You can run it with ng serve. It compiles without any problem, but when you open localhost:4200, the console shows the problem.
|
simply angular version is 5.1.2 and not ^.... and all is right |
I modified my package.json according to that, but did not help. The error message changed a bit, but still the same:
package.json:
My node version is v8.9.4 |
my node version is 6.11.4 |
please fork and create a pull request to support node 8 |
No, it has nothing to do with node version. I tried running with v6.11.4 as you wrote, but still gives the error. |
my package |
Hmm, so you are using ionic... I replaced my package.json with the one you provided, and it still does not work with plain UPDATEOK, so I got it working by creating a new ionic project and applying the sample code I provided previously. So I assume it has to do with ng. Can you create a project with Angular-CLI, and test it? There seems to be some problem with plain ng commands. |
Any news about this? |
Using angular 6 and npm I get the same error while trying to follow the Readme
|
When trying to use the library, it gives me the following message right when I hit a page that uses a HAL-enabled service:
The text was updated successfully, but these errors were encountered: