jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › AngularJS › TypeError: created is not a function
Tagged: jqxAngular
This topic contains 8 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 1 month ago.
-
Author
-
I recently upgraded to 3.7.1 and am seeing an error in my Angular/jQWidgets integration that I had not seen before (I was using 3.5.0). My HTML that is defining a jqxChart looks like this
<jqx-chart id="dashboard-chart" jqx-created="createChart" jqx-settings="chartSettings" jqx-watch="chartSettings.source"></jqx-chart>
When this is being processed, I am seeing a stacktrace that looks like this:
TypeError: created is not a function
at jqxangular.js:1248
at angular.js:16299
at completeOutstandingRequest (angular.js:4924)
at angular.js:5312My chart is still being created, however.
I tried to upgrade to 3.8.0, but still got an error, but a completely different one with the following stacktrace:
TypeError: Cannot read property ‘created’ of undefined
at raiseCreated (jqxangular.js:1296)
at createWidget (jqxangular.js:1321)
at createWidgetsWhenReady (jqxangular.js:1551)
at jqxangular.js:1600
at angular.js:13330
at Scope.$get.Scope.$eval (angular.js:14466)
at Scope.$get.Scope.$digest (angular.js:14282)
at Scope.$get.Scope.$apply (angular.js:14571)
at tick (angular.js:10428)However, now my chart is no longer being drawn (only chart container “box” with the words Title and Description at the top)
One additonal piece of information. If I remove
jqx-created="createChart"
from the HTML, using 3.7.1, the chart is still created, but there is no error. However, using 3.8.0, the error still occurs and no chart is created.Hi durech,
What is jqx-created? The error is correct. There is no such property or function in our API.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/I mistyped the tag. but with out without the mistyped tag, running under 3.7.1 other than the error stacktrace, my chart is still drawn.
However, running under 3.8.0 without the tag (so by HTML looks like this:
<jqx-chart id="dashboard-chart" jqx-settings="chartSettings" jqx-watch="chartSettings.source"></jqx-chart>
)I am getting a totally different error:
TypeError: Cannot read property ‘created’ of undefined
at raiseCreated (jqxangular.js:1296)
at createWidget (jqxangular.js:1321)
at createWidgetsWhenReady (jqxangular.js:1551)
at jqxangular.js:1600
at angular.js:13330
at Scope.$get.Scope.$eval (angular.js:14466)
at Scope.$get.Scope.$digest (angular.js:14282)
at Scope.$get.Scope.$apply (angular.js:14571)
at tick (angular.js:10428)However, now my chart is no longer being drawn (only chart container “box” with the words Title and Description at the top)
Hi durech,
I would suggest you to provide a small example with your code. The current message states that it looks for “created” property of something. I don’t know what’s that property because I don’t know your code and how you use this so please share a small sample or jsfiddle.net link like those on our website and we’ll look into it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/It is going to be difficult to come up with a sample in short order. However, I can tell you it is blowing up in the ‘jqxangualr.js (line:1296)’ on the following line
removed code – EULA violation
= is defined, but the code ‘=’ is returning
-
undefined
, hence the error “TypeError: Cannot read property ‘created’ of undefined”
Is this IF statement supposed to be checking if you have registered a “created” function in your scope and if so then the latter portion of the if would try to execute it. I have not created or registered any such function.
Hi durech,
I do not think that we would be able to reproduce an issue without a sample which demonstrates it. I should also mention that I removed code from your post due to EULA violation. Please, avoid posting our non-minified sources in your future posts here or anywhere else.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Sorry about that. I thought that little fragment was generic enough to not divulge any proprietary logic, but I will not use any in the future. In any case, until such time as I can come up with an example, I will just have to stay on version 3.7.1, since it does not issue any errors (once I corrected my “jqx-create” tag reference) and it still produces my chart. 3.8.0 simply will not get past that line of code and the chart is not produced.
Are there some changes in the 3.8.0 jqxAngular interface that require me to make additional changes. If there are, I could not find any reference to them in the documentation or release notes
Hi durech,
I do not understand why you do not wish to provide a small sample which demonstrates your issue, but if you want to stay with old version, that’s fine.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.