1
votes

I have imported the following lines in angular module and also imported.but still getting following error error NG8002: Can't bind to 'value' since it isn't a known property of 'ngs-code-editor'.

  1. If 'ngs-code-editor' is an Angular component and it has 'value' input, then verify that it is part of this module.
  2. If 'ngs-code-editor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

import { CodeEditorModule } from '@ngstack/code-editor'; import { FormsModule } from "@angular/forms";

imports: [CodeEditorModule.forRoot() ,FormsModule ],

  <ngs-code-editor style="height:90%;width:100%"
  theme="vs-light" 
  
  [(value)]="code"
  language="typescript"
 
  [options]="options"
  (valueChanged)="onrqCodeChanged($event)">
</ngs-code-editor>
1

1 Answers

0
votes

This error occurred because Angular couldn't find the CodeEditorModule.

For example, if the CodeEditorModule.forRoot() is imported in your component.module.ts, make sure you import ComponentModule within your AppModule.