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

Error in EJAngular2Module is not an NgModule #1

Closed
GasyTek opened this issue May 5, 2017 · 3 comments
Closed

Error in EJAngular2Module is not an NgModule #1

GasyTek opened this issue May 5, 2017 · 3 comments

Comments

@GasyTek
Copy link

GasyTek commented May 5, 2017

Hi,

I use Angular CLI (version 1.0.1) and EJ-Angular (version 15.1.44).
I get the error message metionned on the title when I run my Angular 2 app with the command "ng serve".
What is strange is that it disappears when the app is "live recompiled" ..

Any ideas ? Thanks

Riana

@karthickthangasamy
Copy link
Collaborator

Hi @GasyTek ,

That is because issue in Angular CLI, refer to the thread here to explore.

To resolve the issue, we can import the EJAngular2Module like the below code snippet.

import { EJAngular2Module } from 'ej-angular2';  
 
const EJModule: ModuleWithProviders = { 
    ngModule: EJAngular2Module 
}; 
 
 
@NgModule({ 
  declarations: [ 
    AppComponent 
  ], 
  imports: [ 
    BrowserModule, 
    FormsModule, 
    HttpModule, 
    EJModule 
  ], 
  providers: [], 
  bootstrap: [AppComponent] 
}) 

Hope the information helps.!!!

@susandotmark
Copy link

Hi @GasyTek ,

That is because issue in Angular CLI, refer to the thread here to explore.

To resolve the issue, we can import the EJAngular2Module like the below code snippet.

import { EJAngular2Module } from 'ej-angular2';  
 
const EJModule: ModuleWithProviders = { 
    ngModule: EJAngular2Module 
}; 
 
 
@NgModule({ 
  declarations: [ 
    AppComponent 
  ], 
  imports: [ 
    BrowserModule, 
    FormsModule, 
    HttpModule, 
    EJModule 
  ], 
  providers: [], 
  bootstrap: [AppComponent] 
}) 

Hope the information helps.!!!

still throws error

@AbinayaSubbiah
Copy link
Contributor

Hi GasyTek,

The previously reported issue due to old version of our Syncfusion Angular component package ej-angular2(15.1.44) not supports in-built AOT compilation with Angular CLI (version 1.0.1) which have internally AOT compilation by default. Since we provided the work around solution to resolve the issue. Now the latest version of Syncfusion Angular components supports AOT Compilation so we suggest you to try the below one of the solution.

  • Upgrade Angular CLI and Syncfusion Angular dependencies to latest.
    npm install @angular/cli@latest -g
    npm install syncfusion-javascript --save
    npm install ej-angular2 –save
    npm install --save-dev @types/jquery
    npm install --save-dev @types/ej.web.all

  • If you are using Angular CLI version 1.0.1 upgrade Syncfusion Angular components with below list of command.
    npm install syncfusion-javascript --save
    npm install ej-angular2 –save
    npm install --save-dev @types/jquery@2.0
    npm install --save-dev @types/ej.web.all

Please let us know if you need further assistance on this.

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

4 participants