2017-02-08 7 views
0

https://www.npmjs.com/package/ng2-tree-viewで提供されているガイドラインを使用してng2 treeviewパッケージがインストールされました。コード実行中に次のエラーが表示されます。 。ここ は誤りです:'tree-view'の既知のプロパティではないため 'customClass'にバインドできません

 Unhandled Promise rejection: Template parse errors: 
     Can't bind to 'customClass' since it isn't a known property of 'tree-view'. 
     1. If 'tree-view' is an Angular component and it has 'customClass' input, then verify that it is part of this module. 
     2. If 'tree-view' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. 
     (" 
    <tree-view (onNodeSelected)="selectedNode($event)" [ERROR ->][customClass]="'my-custom-class'" [nodes]="sampleNodes"></tree-view> 
"): [email protected]:57 
    Can't bind to 'nodes' since it isn't a known property of 'tree-view'. 
     1. If 'tree-view' is an Angular component and it has 'nodes' input, then verify that it is part of this module. 
     2. If 'tree-view' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. 
    (" 
    <tree-view (onNodeSelected)="selectedNode($event)" [customClass]="'my-custom-class'" [ERROR ->][nodes]="sampleNodes"></tree-view> 
"): [email protected]:91 
    'tree-view' is not a known element: 
    1. If 'tree-view' is an Angular component, then verify that it is part of this module. 
    2. If 'tree-view' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. (" 

enter image description here

+0

nog2-tree-viewを使用しているapp.module.tsとコンポーネント+テンプレートコードを教えてください。 –

答えて

0

私はちょうど「ノード:」削除コードから(コンストラクタの内部)とその作業罰金を。

関連する問題