【发布时间】:2018-04-10 16:20:09
【问题描述】:
我现在正在使用 Angular 和 Electron。
我已经通过我的模块文件导入了ngx-quill。
@NgModule({
imports: [
~~~,
QuillModule
],
exports: [RouterModule]
})
我从我的主要组件文件中导入了Quill
import { QuillEditorComponent } from 'ngx-quill/src/quill-editor.component';
import Quill from 'quill';
我在我的 html 模板中使用了 quill-editor 组件
<quill-editor></quill-editor>
我得到了一个类似的错误:
'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.
【问题讨论】:
-
您只有
AppModule还是您自己的代码中还有其他模块? -
import { QuillEditorModule } from 'ngx-quill-editor';尝试将其导入您的 main.module 文件中。 -
谢谢大家。我通过在右侧模块文件中导入
QuillModule解决了这个问题