I’m using Angular 4 and because I only need the ComboBox
component, I added the needed JavaScript files in the vendor.ts
file:
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.ts
and angular_jqxcombobox.ts
file. I couldn’t compile my app because I had this error Element 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 manageAttributes
function I had to change const options = {}
to let 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)`