摩纳哥编辑器与angular6应用程序集成

摩纳哥编辑器与angular6应用程序集成,angular6,monaco-editor,visual-studio-monaco,Angular6,Monaco Editor,Visual Studio Monaco,我正在尝试在angular-6应用程序中集成angular库,我是新手,官方文档没有任何关于实现的设置指南。如果您有任何建议或指导,我们将不胜感激。请使用ngx monaco editorNPM模块 它提供对各种角度版本的支持 对于Angular 6,您需要执行以下操作 npm install ngx-monaco-editor@6.0.0 --save 然后参考应用程序中的模块 import { MonacoEditorModule } from 'ngx-monaco-editor'; .

我正在尝试在angular-6应用程序中集成angular库,我是新手,官方文档没有任何关于实现的设置指南。如果您有任何建议或指导,我们将不胜感激。

请使用ngx monaco editorNPM模块

它提供对各种角度版本的支持

对于Angular 6,您需要执行以下操作

npm install ngx-monaco-editor@6.0.0 --save
然后参考应用程序中的模块

import { MonacoEditorModule } from 'ngx-monaco-editor';
...
imports: [
...
MonacoEditorModule.forRoot(),
...
然后在html组件中,您可以像这样使用它:

<ngx-monaco-editor ... ></ngx-monaco-editor>

请在此处阅读自述: