Cannot call a class as a function

While calling from html facing a issue like

Cannot call a class as a function

<ejs-richtexteditor id='defaultRTE' [toolbarSettings]='tools' [(ngModel)]="newMessage"
(click)="this.notEntered=false" [enableResize]='false' [showCharCount]='true' [maxLength]='2000'>
ejs-richtexteditor>

core.js:6456 ERROR TypeError: Cannot call a class as a function

    at _classCallCheck (classCallCheck.js:3)

    at new RichTextEditor (ej2-richtexteditor.es2015.js:19924)

    at RichTextEditorComponent._createSuperInternal (createSuper.js:12)

    at new RichTextEditorComponent (ej2-angular-richtexteditor.js:36)

    at NodeInjectorFactory.RichTextEditorComponent_Factory [as factory] (ej2-angular-richtexteditor.js:169)

    at getNodeInjectable (core.js:3549)

    at instantiateAllDirectives (core.js:10259)

    at createDirectivesInstances (core.js:9608)

    at Module.ɵɵelementStart (core.js:14858)


1 Reply

GK Gunasekar Kuppusamy Syncfusion Team July 12, 2021 12:35 PM UTC

Hi Ragu,  
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query Cannot call a class as a function 
 
We tried to reproduce the issue from our end by making the sample by using the shared ‘package.json’ file, but we couldn’t reproduce the issue from our end. We have prepared a sample for your reference, 
 
 
But we suspect that the issue may have occurred because of the target and module in the typescript configuration file. Can you please change the ‘target’ and ‘module’ to ‘es2020’ in the ‘tsconfig.json’ file and ensure the issue once on your end. 
 
If the issue still occurs can you please share the following details? 
  • The code snippet of the Rich Text Editor used in the application.
  • The typescript configuration file.
  • If possible please share us with the issue reproducible sample or please modify the above-shared sample with the issue reproducing code.
 
The above details will be helpful for us to validate and reproduce the issue from our end and assist you at the earliest. 
 
Regards, 
Gunasekar 


Loader.
Up arrow icon