当前位置: 首页 > 工具软件 > ng-quill > 使用案例 >

ERROR in : 'quill-editor' is not a known element:

狄珂
2023-12-01

今天在运行build ng程序的时候,遇见了下面的错误:

ERROR in : 'quill-editor' is not a known element:
1. If 'quill-editor' is an Angular component, then verify that it is part of this module.
2. If 'quill-editor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    <!-- 开始自定义控件区域 -->
    [ERROR ->]<quill-editor [style]="{height: '240px'}" [(ngModel)]="editorContent"  (change)="onContentChanged($ev")

解决方法

npm install ng-quill
npm install angular angular-sanitize quill
npm install ngx-quill-editor --save
import { QuillModule } from 'ngx-quill';

@NgModule({

  imports: [
    QuillModule,

  ]
})

参考文献

[1]. Angular not a known element error. https://stackoverflow.com/questions/47002510/angular-not-a-known-element-error

[2]. ng-quill. https://www.npmjs.com/package/ng-quill

[3]. ngx-quill-editor. https://www.npmjs.com/package/ngx-quill-editor

 

 类似资料: