uncaught TypeError: Cannot read property 'Injectable' of undefined
See original GitHub issueI’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
Current behavior
On page render I am getting the following error:
caught TypeError: Cannot read property ‘Injectable’ of undefined at :3000/scripts.bundle.js:24 at Object…/src/common/tooltip/injection.service.ts (:3000/scripts.bundle.js:24) at e (:3000/scripts.bundle.js:24) at Object…/src/common/tooltip/tooltip.service.ts (:3000/scripts.bundle.js:24) at e (:3000/scripts.bundle.js:24) at Object…/src/common/tooltip/tooltip.directive.ts (:3000/scripts.bundle.js:24) at e (:3000/scripts.bundle.js:24) at Object…/src/common/tooltip/tooltip.module.ts (:3000/scripts.bundle.js:24) at e (:3000/scripts.bundle.js:24) at Object…/src/common/tooltip/index.ts (:3000/scripts.bundle.js:24)
That said the page render correctly and ngx-chart is showing properly.
Expected behavior
Reproduction of the problem
What is the motivation / use case for changing the behavior?
error shown in console on render.
Please tell us about your environment:
Angular CLI 1.4.3
ngx-charts version: x.x.x
“@swimlane/ngx-charts”: “^6.1.0”,
Angular version: 2.x.x
4.4.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 ]
Chrome 61
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
Great. I feel like I have seen somewhere in the documentation that you need to add the JS file to the angular-cli.json file. Anyhow, this issue is resolved for me. Thanks!
Importing the module is the way to do it.
import { NgxChartsModule } from '@swimlane/ngx-charts';