Open manuchadha1979 opened 4 years ago
Hi
Does ng2-ace-editor support Form binding? I suppose so as I saw that it implements ControlValueAccessor.
ng2-ace-editor
I am on Angular6. I am trying to use ace-editor as a FormControl. I have added the following code in the template.
ace-editor
FormControl
<div ace-editor [(text)]="text" [mode]="'sql'" [theme]="'eclipse'" [options]="options" [readOnly]="false" [autoUpdateContent]="true" [durationBeforeCallback]="1000" (textChanged)="onChange($event)" style="min-height: 200px; width:100%; overflow: auto;" class="form-control" formControlName="answer" [ngClass]="validateField('answer')"> </div>
But when I run the I see error
ERROR Error: No value accessor for form control with name: 'answer'
What I might be doing wrong?
I think I was using it incorrectly. I was following the Directive instructions while I should have followed the Component instructions. I might be Ok. I'll test and confirm
Hi
Does
ng2-ace-editor
support Form binding? I suppose so as I saw that it implements ControlValueAccessor.I am on Angular6. I am trying to use
ace-editor
as aFormControl
. I have added the following code in the template.But when I run the I see error
ERROR Error: No value accessor for form control with name: 'answer'
What I might be doing wrong?