ng2-ckeditor 404(未找到)angular2

时间:2016-06-08 13:04:40

标签: angular ckeditor

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

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

我在哪里调用我放<ckedito></ckeditor>的地方 我收到此错误

 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

{
  "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] 感谢

1 个答案:

答案 0 :(得分:1)

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

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