- Home
- Forum
- Angular - EJ 2
- Error NumerocTextBox when deploy
Error NumerocTextBox when deploy
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
SIGN IN To post a reply.
3 Replies
CI
Christopher Issac Sunder K
Syncfusion Team
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
MC
Manolo Capdevila
January 9, 2019 04:39 PM UTC
Ok, It works using Module instead Component.
But Toast has the same problem in documentation
PG
Pon Geetha A J
Syncfusion Team
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.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
MC Manolo Capdevila
- Jan 8, 2019 10:42 AM UTC
- Jan 10, 2019 07:34 AM UTC