jQWidgets Forums
jQuery UI Widgets › Forums › Angular › Angular 2 jqxChart typescript compile error
This topic contains 7 replies, has 3 voices, and was last updated by Ivo Zhulev 8 years, 8 months ago.
-
Author
-
Hi,
I am trying the sample http://www.jqwidgets.com/jquery-widgets-demo/demos/angular2/index.htm#demos/angular2/angular-chart-columnlocaldata.htm and found that settings : jqwidgets.ChartOptions is giving compile time error. I have installed the latest jqwidgets framework from npm. I am not sure whether the samples are not updated and the typescript definitions are not correct.Please update the sample or typescript definition.
Thanks
Hi rbmanian75,
Do you mean it gives error “cannot find namespace ‘jqwidgets'” or some other error?
Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/The error what we are getting is
Severity Code Description Project File Line Suppression State
Error Build:Type ‘{ title: string; description: string; enableAnimations: true; showLegend: true; padding: { left: …’ is not assignable to type ‘ChartOptions’. jqDateBug C:\TEMP\jqDateBug\jqDateBug\app\app.component.ts 56Please download the sample project from and open in visual studio and try to build it. You will get the above mentioned error
Thanks
sorry here is the link to download https://1drv.ms/u/s!Agn6grFjxV5QijRJ_tlC4r8NiBx9
Hi,
I downloaded latest release version for try to use Angular 2 components and got compile time error too – Identifier expected. in jqwidgets.(id: any)…. Error in your .ts files in jqwidgets-ts. Could you fix it or explain how correct to use Angular 2 components? Because explanation from Angular 2 demo not works if I copied jqwidgets and jqwidgets-ts folders and configure my app.Hi rbmanian75 and Vitalii
rbmanian75 :
The error you are receiving is a typescript one. It’s happening because some of the value types you set aren’t the corresponding ones.
For example:
jqxChartenableAnimations
prop:
It should be of boolean type, but if you set it to lets sayenableAnimations: 'yes'
it will throw that error.Vitalii:
This error often occurs if you have a missed out/misplaced semicolon or comma.
Check the code for that.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/Hi,
I not sure for that. My app compile correct but when I include jqwidgets-ts folder then I get this error.
Ok, I tried another way. I installed jqwidgets-framework from npm install, configure app like in rbmanian75 example, and app compile correct. But if I try to use input or button and include jqwidgets-ts/angular_jqxbuttons or jqwidgets-ts/angular_jqxinput I get errors incide this components like “has no exported member ‘noop'” and “Class ‘jqxInputComponent’ incorrectly implements interface ‘ControlValueAccessor'”.
What am I doing wrong?Hi Vitalii,
This is a bug and it will be gone in the next release.
For now you can open the angular_widgetName.ts file you use and remove the code related to ‘noop’ and ‘ControlValueAccessor’.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.