jQuery UI Widgets › Forums › General Discussions › Angular › Cannot set property 'source' of undefined
Tagged: #combobox
This topic contains 2 replies, has 2 voices, and was last updated by Ivo Zhulev 9 years, 2 months ago.
-
Author
-
I’m using Angular 4 and because I only need the
ComboBoxcomponent, I added the needed JavaScript files in thevendor.tsfile:import './jqxWidgets/jqxcore.js'; import './jqxWidgets/jqxbuttons.js'; import './jqxWidgets/jqxscrollbar.js'; import './jqxWidgets/jqxlistbox.js'; import './jqxWidgets/jqxcombobox.js';And only added the
jqwidgets.d.tsandangular_jqxcombobox.tsfile. I couldn’t compile my app because I had this errorElement implicitly has an 'any' type because type 'jqxComboBoxComponent' has no index signature.so I had to add[key: string]: any;to the component.Also in the
manageAttributesfunction I had to changeconst options = {}tolet options: { [key: string]: any };because of the same reasons.Do any of the changes I made have anything to do with this or am I missing something? This is the console error:
`TypeError: Cannot set property ‘source’ of undefined
at jqxComboBoxComponent.manageAttributes (angular_jqxcombobox.ts:181)
at jqxComboBoxComponent.createComponent (angular_jqxcombobox.ts:203)
at jqxComboBoxComponent.ngOnInit (angular_jqxcombobox.ts:134)
at checkAndUpdateDirectiveInline (core.es5.js:10843)
at checkAndUpdateNodeInline (core.es5.js:12339)
at checkAndUpdateNode (core.es5.js:12278)
at debugCheckAndUpdateNode (core.es5.js:13139)
at debugCheckDirectivesFn (core.es5.js:13080)`I installed the framework from
npm, I changed thenoImplicityAnysetting to false, importedjqx-alland I got it to work. What imports am I missing, because I don’t want to include a 3mb script (I’m only using the combo box)?Hi GregoryHouseMD,
As you can see from our angular combobox demos: http://www.jqwidgets.com/angular/angular-combobox/index.htm,
for the combobox, you needjqxcore.js, jqxbuttons.js, jqxscrollbar.js, jqxlistbox.js, jqxcombobox.js.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.