We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error NumerocTextBox when deploy

Thread ID:

Created:

Updated:

Platform:

Replies:

141854 Jan 8,2019 10:42 AM UTC Jan 10,2019 07:34 AM UTC Angular - EJ 2 3
loading
Tags: NumericTextBox
Manolo Capdevila
Asked On January 8, 2019 10:42 AM UTC

Hi,

I've get an error when I deploy an angular application that it has NumericTextBoxComponent

I've get this error:

ERROR in : Type NumericTextBoxComponent in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.component.d.ts is part of the declarations of 2 modules: AppModule in E:/angular/NumerixProblem/src/app/app.module.ts and NumericTextBoxModule in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.module.d.ts! Please consider moving NumericTextBoxComponent in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.component.d.ts to a higher module that imports AppModule in E:/angular/NumerixProblem/src/app/app.module.ts and NumericTextBoxModule in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.module.d.ts. You can also create a new NgModule that exports and includes NumericTextBoxComponent in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.component.d.ts then import that NgModule in AppModule in E:/angular/NumerixProblem/src/app/app.module.ts and NumericTextBoxModule in E:/angular/NumerixProblem/node_modules/@syncfusion/ej2-angular-inputs/src/numerictextbox/numerictextbox.module.d.ts.

In debug, it works fine

I attach an example



Attachment: NumerixProblem_111f5d71.zip

Christopher Issac Sunder K [Syncfusion]
Replied On January 9, 2019 11:32 AM UTC

Hi Manolo, 

Our components are to be rendered as Angular Module and not as Angular Component. Rendering using Angular Component will not work in latest angular versions as it is not the correct structure of the Angular project. It has not been updated in our documentation. The documentation will be modified and refreshed in online as early as possible. 

So, you can use Module instead of Component to resolve your issue. Please check the below code block, 

app.module.ts 

import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { NumericTextBoxModule } from '@syncfusion/ej2-angular-inputs'; 
import { AppComponent } from './app.component'; 

@NgModule({ 
  declarations: [ 
    AppComponent 
  ], 
  imports: [ 
    BrowserModule, 
            NumericTextBoxModule 
  ], 
  providers: [], 
  bootstrap: [AppComponent] 
}) 
export class AppModule { } 


We have modified your sample with the above mentioned changes –  

Please check it and let us know if you have any more concerns. 

Thanks, 
Christo

Manolo Capdevila
Replied On January 9, 2019 04:39 PM UTC

Ok, It works using Module instead Component.

But Toast has the same problem in documentation

Pon Geetha A J [Syncfusion]
Replied On January 10, 2019 07:34 AM UTC

Hi Manolo,  
 
Thanks for bringing this to our notice.  
 
We checked the reported issue in all our components along with the Toast component and logged a task for updating documentation. This will be available online shortly.  
 
Please let us know if you have any other queries. 
 
Regards,  
Deepa L. 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;