ng2-ckeditor 404 (Not Found) angular2

杀马特。学长 韩版系。学妹 提交于 2019-12-12 12:47:08

问题


I added ng2/CKEDitor with cmd npm install ng2-ckeditor it well installed there is an example https://www.npmjs.com/package/ng2-ckeditor I did the same things and I added also this script in my index

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

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

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"
  ]
}

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


回答1:


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

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


来源:https://stackoverflow.com/questions/37703351/ng2-ckeditor-404-not-found-angular2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!