2016-10-14 7 views
0

私はangle2プロジェクトで動作するようにTinyMCEを取得しようとしています。私は例外を取得した後、ビューをリロードするまでディレクティブは、MYEビューで罰金をロードしているthis questionAngular2ファイナルでのTinyMCE - リロード時の問題

にAviad Pの答えのように私はtinymce.directiveを作成しました:

EXCEPTION: Uncaught (in promise): Error: Error in ./ThreadComponent class ThreadComponent - inline template:26:0 caused by: tinymce is not defined 

私は、ディレクティブは、前述の問題の1の直線コピーである、と私は宣言する必要はあり

<textarea htmlEditor [(ngModel)]="txt"></textarea> 

答えて

0

とページ上でそれをロードし、あなたのモジュールでThreadComponent(ThreadDirective is best practice)

import { ThreadDirective } from '(your directive path)'; 
 
@NgModule({ 
 
    declarations: [ 
 
    AppComponent, 
 
    ThreadDirective 
 
    ], 
 
    imports: [ 
 
    BrowserModule, 
 
    FormsModule, 
 
    HttpModule 
 
    ], 
 
    providers: [], 
 
    bootstrap: [AppComponent] 
 
}) 
 
export class AppModule { }

今すぐあなたのディレクティブを使用することができます