Web*_*per 5 components angular
我将为我的angular 4项目使用ng2-ckeditor插件.我读了指南,有systemjs文件的配置.但我在我的角度4 cli项目中找不到systemjs.所以除了systemjs config之外,我做了指南中提到的其他事情.最后的结果是简单的文本框和警告
'CKEditor 4.x is missing (http://ckeditor.com/)'
Run Code Online (Sandbox Code Playgroud)
这些都是我所做的.
1) /*added this script to my component html file*/
<script src="https://cdn.ckeditor.com/4.5.11/full/ckeditor.js"></script>
2)
npm install ng2-ckeditor
3) set appmodule
import { CKEditorModule } from 'ng2-ckeditor';
@NgModule({
// ...
imports: [
CKEditorModule
],
// ...
})
export class AppModule { }
4) use component
<ckeditor [(ngModel)]="content" debounce="500">
<p>Hello <strong>world</strong></p>
</ckeditor>
Run Code Online (Sandbox Code Playgroud)
我想知道如何设置systemjs,即使我在我的项目中找不到systemjs文件而且无论如何都没有设置这个?最好的祝福
在index.html中导入脚本
<script src="https://cdn.ckeditor.com/4.6.1/full/ckeditor.js"></script>
Run Code Online (Sandbox Code Playgroud)