2017-09-13 3 views
1

が定義されていないPrimeNgエラー:<a href="https://www.primefaces.org/primeng/#/editor" rel="nofollow noreferrer">https://www.primefaces.org/primeng/#/editor</a></p> <p>しかし、私はエラーを取得しています:クイルが、私はprimengでエディタコントロールを使用しようとしています

ERROR ReferenceError: Quill is not defined at Editor.webpackJsonp.../../../../primeng/components/editor/editor.js.Editor.ngAfterViewInit

は私のプロジェクトでは、使用しています:

  • を角度Cli:1.4.1
  • 角度:4.3.6
  • NPM:5.4.1
  • ノード:6.10
  • PrimeNG:4.2.0

私はこの問題を発見した:https://github.com/primefaces/primeng/issues/807

私は指示に従った:

輸入エディタモジュール

import {EditorModule} from 'primeng/primeng'; 

パッケージをインストールする:

npm install quill --save 

npm install @types/quill --save 

更新アンギュラcli.json

"styles": [ "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css", ], "scripts": [ "../node_modules/quill/dist/quill.js" ], 

が、それはまだ同じ問題を持っています。私は、デフォルトのマークアップ追加してい:

<p-editor [(ngModel)]="text" [style]="{'height':'320px'}"></p-editor> 

をそして、私はエラーを取得し、それは次のようになります。私は試していない、そのスレッド上の唯一のことは、WebPACKのプラグインをインストールしている

enter image description here

私は角を使用しているので、私はそれがオプションだとは思わない。

これを解決するにはどうすればよいですか?

+0

は、それがこのコントロールのテストを初期化するために、あなたがどんな考えを持っていますか? –

答えて

2

これを試してみてください。

Node : 7.9.0 
angular/cli: 1.3.0 
angular: 4.3.6 
npm: 4.2.0 
primeng": "^4.2.0-rc.1" 

ノードモジュールクイル

npm install quill --save 

.angular-cli.json

をインストールします。完全に

バージョンは私のために働いています

app.module.ts

import { EditorModule } from 'primeng/primeng'; 

@NgModule({ 
    imports: [ 
     EditorModule 
    ] 
}) 

app.component.html

<p-editor [(ngModel)]="text" [style]="{'height':'320px'}"></p-editor> 

app.component。TS

export class AppComponent { 
    text: string; 
} 

+0

これは私がやったのと同じように見えます。違いがわかりません – Guerrilla

+0

私と同じバージョンを使用していますか? – Guerrilla

+0

更新されたバージョン私は使用されます回答を確認します – Chandru

関連する問題

 関連する問題