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

Instructions need to include restart of 'ng serve' #26

Open
wgtthompson opened this issue Aug 25, 2018 · 1 comment
Open

Instructions need to include restart of 'ng serve' #26

wgtthompson opened this issue Aug 25, 2018 · 1 comment

Comments

@wgtthompson
Copy link

wgtthompson commented Aug 25, 2018

Spent about a day on this wondering why I had followed all directions but couldn't get it to work. I kept getting an error in the JS console in Firefox sayingERROR ReferenceError: Dygraph is not defined. The Dygraph object just showing a spinning bubble wheel in the browser. No amount of searching the internet for combinations of the error message, Angular, Dygraph, ng-dygraphs, etc came anywhere close to a solution. I branched out and started researching how to use an existing JS library within angular and after very careful reading I noticed one little statement that said you need to restart 'ng serve' in order for the modifications to angular.json (angular-cli.json in the instruction) to be picked up.

@pierre-fromager
Copy link

As provided in other issue comment I advise to add the following npm packages to your project.
@types/dygraphs
dygraphs
Then in your ts code do the import as below.
import Dygraph from 'dygraphs';

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