CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 493 forks source link

webpack AOT v2.7 Property 'loadingTemplate' does not exist on type 'LoadingComponent'. #144

Closed Jarvens closed 7 years ago

Jarvens commented 7 years ago

Hi,

When i start AOT by angular-tree-component and the version of 2.7

throughs some mistake like this:

Starting compilation using the angular compiler. Angular compilation done, starting webpack bundling. Error: Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/loading.component.ngfactory.ts:40:20: Property 'loadingTemplate' does not exist on type 'LoadingComponent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/loading.component.ngfactory.ts:167:49: Property 'loadingTemplate' does not exist on type 'LoadingComponent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/loading.component.ngfactory.ts:170:44: Property 'loadingTemplate' does not exist on type 'LoadingComponent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node-content.component.ngfactory.ts:49:20: Property 'treeNodeContentTemplate' does not exist on type 'TreeNodeContent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node-content.component.ngfactory.ts:189:49: Property 'treeNodeContentTemplate' does not exist on type 'TreeNodeContent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node-content.component.ngfactory.ts:194:44: Property 'treeNodeContentTemplate' does not exist on type 'TreeNodeContent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node.component.ngfactory.ts:67:20: Property 'nodeIndex' does not exist on type 'TreeNodeComponent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node.component.ngfactory.ts:74:20: Property 'treeNodeContentTemplate' does not exist on type 'TreeNodeComponent'. Error at /Users/kunlun/Desktop/huala-system/compiled/node_modules/angular2-tree-component/dist/components/tree-node.component.ngfactory.ts:81:20: Property 'loadingTemplate' does not exist on type 'TreeNodeComponent'.

Thank you

vshapran commented 7 years ago

Similar situation. Though I'm getting errors only regarding TreeNodeComponent:

Property 'nodeIndex' does not exist on type 'TreeNodeComponent' Property 'treeNodeContentTemplate' does not exist on type 'TreeNodeComponent' Property 'loadingTemplate' does not exist on type 'TreeNodeComponent'

vshapran commented 7 years ago

Moreover: ...\node_modules\angular2-tree-component\dist\components\tree-node.component.d.ts really doesn't contain those props but in compiled version ...\node_modules\angular2-tree-component\dist\compiled\lib\components\tree-node.component.ngfactory.js they are used

x0156 commented 7 years ago

Add the missing properties to the type definition file(workaround) and recompile. This should solve the issue.

vshapran commented 7 years ago

There is also one more workaround - just take all files from lib directory, include in your project and build with your source code. Works for me.

Jarvens commented 7 years ago

i also solved this mistake by adding that property ,but i want find another way

adamkleingit commented 7 years ago

Hey, True, there's a weird mismatch between .d.ts and compiled. I'll look into it

adamkleingit commented 7 years ago

Fixed in 2.8.0. Please verify

Jarvens commented 7 years ago

thanks i 'll have a try later