问题
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