angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

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

Open Jarvens opened this issue 9 years ago • 8 comments

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

Jarvens avatar Jan 12 '17 02:01 Jarvens

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 avatar Jan 25 '17 23:01 vshapran

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

vshapran avatar Jan 25 '17 23:01 vshapran

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

x0156 avatar Jan 27 '17 06:01 x0156

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.

vshapran avatar Jan 27 '17 06:01 vshapran

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

Jarvens avatar Jan 28 '17 11:01 Jarvens

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

adamkleingit avatar Feb 02 '17 20:02 adamkleingit

Fixed in 2.8.0. Please verify

adamkleingit avatar Feb 03 '17 00:02 adamkleingit

thanks i 'll have a try later

Jarvens avatar Feb 04 '17 00:02 Jarvens