2016-04-13 3 views
0

でCKEditor.d.tsのtypescriptです定義ファイルを使用してDefinitelyTypedレポから、私は、角2でプロジェクトを持っていると私はCKEditorバージョンのtypescriptです定義を使用したいの角2

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/ckeditor/ckeditor.d.ts

問題は私がありますエラーが発生しましたEvaluating http://localhost:3000/typings/ckeditor/ckeditor.d.tsここにckeditorファイルを含むコードがあります。

import {CoursesService} from "../../../services/courses" 
/// <reference path="../../../../typings/ckeditor/ckeditor.d.ts" /> 

import {CKEDITOR} from "../../../../typings/ckeditor/ckeditor.d.ts" 
export class CreateCourseComponent implements OnInit { 
    ngOnInit(){ 
     CKEDITOR.replace('text_area'); 
    } 
} 

答えて

0

定義ファイルは、そのコンパイル時、モジュールなので、この行削除されていません。

import {CKEDITOR} from "../../../../typings/ckeditor/ckeditor.d.ts" 

と輸入CKEditorバージョン使用してスクリプトタグを。

+0

この行を削除しても問題が解決しない場合は、エラー「CKEditor is not defined」が生成されます。 – noor

関連する問題