Angular chartjs installation

UI Components for React
Post Reply
Alexkon
Posts: 1
Joined: 14 Jul 2023, 14:20

14 Jul 2023, 14:26

Hello, i am using angular 16 and 16.0.2 primeng version, i installed chatjs using the primeng site documentation.

While adding to package.json on the scripts section the following: "../node_modules/chart.js/dist/chart.js" i got the following error on the browser:
"scripts.js: Uncaught SyntaxError: Cannot use import statement outside a module"

Then i referd to the chartjs documentation and changed the following: "../node_modules/chart.js/dist/chart.js" to "../node_modules/chart.js/dist/chart.umd.js"
and then the error got away.

Please let me know if there was something wrong form my part or this is a documentation missinformation.

Thanks

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

28 Jul 2023, 19:20

Wrong forum this is PrimeReact not PrimeNG.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests