p-chart is not recognized as an element error message

UI Components for Angular
Post Reply
sagemeister
Posts: 1
Joined: 18 Oct 2017, 23:28

19 Oct 2017, 01:38

I am trying to render a simple pie chart from the examples give on the document page. I literally copied the code from the sample page but it gives me the following error message:

compiler.es5.js:1694 Uncaught Error: Template parse errors:
'p-chart' is not a known element:
1. If 'p-chart' is an Angular component, then verify that it is part of this module.
2. If 'p-chart' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<h2>Test module</h2>
[ERROR ->]<p-chart type="pie" ></p-chart>"): ng:///AppModule/PieChartDemoComponent.html@1:0
at syntaxError (compiler.es5.js:1694)
at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (compiler.es5.js:12791)

the HTML document is straight forward. I took the data binding off to see if that fixed the issue but it didn't the HTML file looks like the following:

<h2>Test module</h2>
<p-chart type="pie" ></p-chart>

Can anyone suggest anything to try to get it to work?? Thanks in advance.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

20 Oct 2017, 06:22

Can you configured the chart module in your app module.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests