angular-editor icon indicating copy to clipboard operation
angular-editor copied to clipboard

Error: Can't bind to 'config' since it isn't a known property of 'angular-editor'.

Open syahirudean opened this issue 4 years ago • 4 comments

Hi, I've imported the { AngularEditorModule } module and to my app.module and imported the { AngularEditorConfig } into my component as the guide. But Ithis error keeps poping.

`ERROR in projects/sg-math/src/app/features/question/ask/ask.component.html:14:43 - error NG8002: Can't bind to 'config' since it isn't a known property of 'angular-editor'. 1. If 'angular-editor' is an Angular component and it has 'config' input, then verify that it is part of this module. 2. If 'angular-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.

14 <angular-editor [(ngModel)]="htmlContent" [config]="config"></angular-editor>
                                             ~~~~~~~~~~~~~~~~~

  projects/sg-math/src/app/features/question/ask/ask.component.ts:6:16
    6   templateUrl: './ask.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component AskComponent.`

syahirudean avatar Jul 24 '21 01:07 syahirudean

I have the most recent version and cannot verify this. Not only that, you can see in the code on github here that the input does exist.

@Input() config: AngularEditorConfig = angularEditorConfig;

So this must be an issue on your end.

Gaugeforever avatar Oct 14 '21 14:10 Gaugeforever

I am trying to put this editor into my project.

page.ts

...
import { AngularEditorModule } from '@kolkov/angular-editor';
import { AngularEditorConfig } from '@kolkov/angular-editor';
...
editorConfig: AngularEditorConfig = {
    editable: true,
    spellcheck: true,
    minHeight: '5rem',
    maxHeight: '75rem',
    translate: 'no',
    sanitize: false,
    defaultFontName: 'Verdana',
    defaultFontSize: '12',
    defaultParagraphSeparator: 'p',
  };

  @Input() config: AngularEditorConfig = this.editorConfig;

page.html

<angular-editor name="SidebarContent" [(ngModel)]="SidebarContent" [config]="editorConfig" ></angular-editor>

I'm getting the same error.

ChipClark avatar Nov 12 '21 18:11 ChipClark

I have te same error and i solved..

Import angular-editor module

import { HttpClientModule} from '@angular/common/http'; import { AngularEditorModule } from '@kolkov/angular-editor';

@NgModule({ imports: [ HttpClientModule, AngularEditorModule ] })

dentro del app.module.ts tenes que importar import { HttpClientModule} from '@angular/common/http'; import { AngularEditorModule } from '@kolkov/angular-editor'; y ademas agregar a los imports dentro del NgModule HttpClientModule, AngularEditorModule

rherrera94 avatar Dec 14 '21 12:12 rherrera94

https://github.com/kolkov/angular-editor#readme you have to read te part of usage

rherrera94 avatar Dec 14 '21 12:12 rherrera94