I'm failing to include ng2-nvd3 in my angular 4 project. I don't want to include online resources, it should work offline as well.
I installed the following packages:
npm install ng2-nvd3npm install nvd3npm install d3@v3.5.17
And copied the code from app.module.ts, app.component.ts and replaced <app-root></app-root> by <main></main> from the plunker example here: http://plnkr.co/edit/T4i7Zh?p=preview example
Now when I'm running it it is compiling fine but in the browser console I get this error:
ERROR ReferenceError: nv is not defined at NvD3Component.clearElement (ng2-nvd3.component.js:211) at NvD3Component.initChart (ng2-nvd3.component.js:32) at NvD3Component.ngOnChanges (ng2-nvd3.component.js:20) at checkAndUpdateDirectiveInline (core.es5.js:10891) at checkAndUpdateNodeInline (core.es5.js:12382) at checkAndUpdateNode (core.es5.js:12321) at debugCheckAndUpdateNode (core.es5.js:13182) at debugCheckDirectivesFn (core.es5.js:13123) at Object.eval [as updateDirectives] (AppComponent.html:3) at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:13108)
How can I get this working? I don't want to include online resources like this:
I'm failing to include
ng2-nvd3
in my angular 4 project. I don't want to include online resources, it should work offline as well.I installed the following packages:
npm install ng2-nvd3
npm install nvd3
npm install d3@v3.5.17
And copied the code from
app.module.ts
,app.component.ts
and replaced<app-root></app-root>
by<main></main>
from the plunker example here: http://plnkr.co/edit/T4i7Zh?p=preview exampleNow when I'm running it it is compiling fine but in the browser console I get this error:
ERROR ReferenceError: nv is not defined at NvD3Component.clearElement (ng2-nvd3.component.js:211) at NvD3Component.initChart (ng2-nvd3.component.js:32) at NvD3Component.ngOnChanges (ng2-nvd3.component.js:20) at checkAndUpdateDirectiveInline (core.es5.js:10891) at checkAndUpdateNodeInline (core.es5.js:12382) at checkAndUpdateNode (core.es5.js:12321) at debugCheckAndUpdateNode (core.es5.js:13182) at debugCheckDirectivesFn (core.es5.js:13123) at Object.eval [as updateDirectives] (AppComponent.html:3) at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:13108)
How can I get this working? I don't want to include online resources like this: