我有Angular 5.x上的项目
试图导入this editor

这是众所周知的Ace editor上面的TypeScript包装器

编辑工作,我在我的项目中看到它,一切都很好 . 直到我尝试更改某些设置 . 默认语言是SQL . 我需要编辑JSON . 所以我使用这样的语法:

<div
  ace-editor
  [(text)]="json"
  [mode]="'json'"
  [theme]="'eclipse'"
  [readOnly]="false"
  [autoUpdateContent]="true"
  [durationBeforeCallback]="1000"
></div>

并在浏览器的控制台中收到以下错误(Chrome,最新):

拒绝从'http:// localhost:4200 / mode-json.js'执行脚本,因为其MIME类型('text / html')不可执行,并且启用了严格的MIME类型检查 .

以下行添加到 .angular-cli.json 文件中:

scripts: [
  "../node_modules/ace-builds/src-min/ace.js",
  "../node_modules/ace-builds/src-min/theme-eclipse.js"
]

所以...有人可以给我一个答案,如何在没有拐杖的情况下解决这个问题?