本文介绍了ng2-ckeditor 404(未找到)angular2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ng2/CKEDitor中添加了cmd npm install ng2-ckeditor它安装得很好有一个示例 https://www.npmjs.com/package/ng2-ckeditor 我做了同样的事情并且我还在索引

I added ng2/CKEDitor with cmd npm install ng2-ckeditorit well installedthere is an example https://www.npmjs.com/package/ng2-ckeditorI did the same thingsand I added also this script in my index

<script src="https://cdn.ckeditor.com/4.5.8/standard/ckeditor.js"></script>

我在其中放置<ckedito></ckeditor>的视图我收到此错误

where I call view where I put <ckedito></ckeditor>I get this error

 zone.js:101 GET http://localhost:9000/ng2-ckeditor 404 (Not Found)

    Error loading http://localhost:9000/ng2-ckeditor as "ng2-ckeditor" from http://localhost:9000/dist/app.component.js

但是我担心,因为他们在示例中提到了:Sample(ES6)在我的tsconfig中,我有es5

but I worry because they mentioned in example: Sample(ES6)and in my tsconfig i have es5

{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "module": "system",
    "moduleResolution": "node",
    "removeComments": true,
    "sourceMap": true
  },
  "exclude": [
    "node_modules",
    "typings/main.d.ts",
    "typings/main"
  ]
}

添加此内容时出现错误directives: [ CKEditor]谢谢

when I add this I get error directives: [ CKEditor]thanks

推荐答案

您可以将其添加到SystemJS配置中的map块中:

You could add this to the map block in the SystemJS configuration:

'ng2-ckeditor': 'node_modules/ng2-ckeditor/lib/ng2-ckeditor.js'

这篇关于ng2-ckeditor 404(未找到)angular2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 04:00