Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Cannot declare 'IgxTimeXAxisComponent' in an NgModule as it's not a part of the current compilation.

Cannot declare 'IgxTimeXAxisComponent' in an NgModule as it's not a part of the current compilation.

New Discussion
David Lott
David Lott asked on Apr 21, 2021 6:53 PM

I’m trying to modify the sample project found here:
https://pt-br.infragistics.com/community/forums/f/ignite-ui-for-angular/122841/igx-pie-chart-igx-line-chart/540293#540293

testsampleLine.zip

I’ve taken the line chart and I’m converting the igx-category-x-axis to an igx-time-x-axis. This works fine, but then I’m trying to package the chart up as a component and display it via an IgxNavigationDrawer. If I leave it as a category-x-axis there’s no problem, but as soon as I change it to an igx-time-x-axis (and include IgxTimeXAxisComponent in the declarations section of my app.module.ts) then I get this error in my ng serve console:

Cannot declare ‘IgxTimeXAxisComponent’ in an NgModule as it’s not a part of the current compilation.

and in the browser console I get

core.js:4009 Uncaught Error: Angular JIT compilation failed: ‘@angular/compiler’ not loaded!

I have attached minimal sample where you should be able to reproduce the problem. The sample works as-is, but if you uncomment line 28 of app.module.ts you will see the error:

    // IgxTimeXAxisComponent

dashboard.zip

Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Apr 21, 2021 6:53 PM

    Hello David,

    I tested your sample and noticed that you are missing IgxTimeXAxisModule to add into import .

    Needs to add this:

    import { IgxTimeXAxisModule } from "igniteui-angular-charts";
     IgxRippleModule,
        IgxGridModule,
        IgxTimeXAxisModule,
        IgxNumericYAxisModule,
    also i noticed that you dont need to include IgxTimeXAxisComponent in the declarations. This:
      declarations: [
        AppComponent,
        PowerComponent,
      //  IgxTimeXAxisComponent
    Let me know if you have any question.
    Regards,
  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
David Lott
Favorites
0
Replies
1
Created On
Apr 21, 2021
Last Post
4 years, 10 months ago

Suggested Discussions

Tags

No tags

Created by

Created on

Apr 21, 2021 6:53 PM

Last activity on

Feb 12, 2026 9:18 AM