【发布时间】:2019-04-17 04:10:15
【问题描述】:
当我使用 ng2-ace-editor 时。有配置
<div ace-editor
[(text)]="text"
[mode]="'sql'"
[theme]="'eclipse'"
[options]="options"
[readOnly]="false"
[autoUpdateContent]="true"
[durationBeforeCallback]="1000"
(textChanged)="onChange($event)"
style="min-height: 20px; max-height: 20px; width:100%; overflow: auto;"></div>
但是有console.log
http://localhost:4200/mode-sql.js net::ERR_ABORTED 404 (Not Found)
http://localhost:4200/mode-html.js net::ERR_ABORTED 404 (Not Found)
如何在 ng2-ace-editor 中配置模式?
【问题讨论】:
-
您能否添加有关加载 ace 方式的更多信息,从错误看来 basePath 配置不正确
-
我用 angular-cli 在项目 angular 的 angular.json 中添加了 ace 我不了解自定义 1 模式下 angular 7 中 ace 的操作机制。
-
看起来像 github.com/fxmontigny/ng2-ace-editor 包中的错误,因为即使在 repo 中的示例中也会引发错误,请尝试在 github 上报告问题
标签: javascript angular ace-editor