-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Undefined is not a function - inexplicable error #555
Comments
I am getting this same error and posted it a while back. Glad to see I am not the only one. In Firefox it shows up as "Error: c.push is not a function" I should add that I have not found a solution to the issue yet. Working on debugging it right now actually. |
No luck so far... Anybody have any ideas? |
So I've got a workaround in the interest of not flooding the logs with error messages. The errors are caused by the ng-bind-html attributes used in ui-select. Replace the three instances in the ui-select.js with standard {{}} syntax and replace the ui-select instances of ng-bind-html in your views with the same {{}} syntax. After doing that you shouldn't see the error any more. I imagine there is a more appropriate fix and the bug leads me to believe that it has something to do with the ngSanitize, but I'm not going to be taking the time to look into it beyond the temporary fix that I have. I should also mention that if you are actually using html in the bindings you will have to find a different solution. |
Awesome, thanks for the fix @Arkh1. That fixed it for me. |
I'm having this issue and I am using html so this fix won't work for me :( i'll need to figure something else out |
If you want to look into an actual fix I imagine this is a good place to start. As part of the 1.3 upgrade ng-bind-html was brought into the core of angular. The above link is the changeset to reflect that modification. |
Anyone fixed this issue yet? |
Going to close as this is confusing and needs more information - feel free to open a new issue with appropriate reproduction in Plunker based on the latest release. |
Hello,
I'm working with version 0.9.4 and AngularJS 1.3.5. I have an issue that doesn't usually cause any problem, but nevertheless shows up as an error in the console.
I have pretty much standard code - I'm trying to get a basic dropdown to function in a dead-simple scenario, so I can use it for more. Here, where $scope.genders is an arrray: ['male','female'], I'm trying to make a super simple select with just these two options. The great thing is that it almost always works as it should. The problem is that it also throws two errors I just can't figure out that I think sometimes cause it to malfunction (maybe 1 in 20 times). Since it mostly works, I'm wondering if this is an error with compatibility with angular 1.3.5 or something like that. Here is my code, and then the error. Help very much appreciated. Using Select2 theme.
And the errors:
TypeError: undefined is not a function at Function.$$addBindingInfo (http://localhost:1112/js/angular.js:6800:18) at ngBindHtmlLink (http://localhost:1112/js/angular.js:21922:18) at invokeLinkFn (http://localhost:1112/js/angular.js:8141:9) at nodeLinkFn (http://localhost:1112/js/angular.js:7653:11) at compositeLinkFn (http://localhost:1112/js/angular.js:7009:13) at nodeLinkFn (http://localhost:1112/js/angular.js:7648:24) at compositeLinkFn (http://localhost:1112/js/angular.js:7009:13) at nodeLinkFn (http://localhost:1112/js/angular.js:7648:24) at delayedNodeLinkFn (http://localhost:1112/js/angular.js:7902:11) at compositeLinkFn (http://localhost:1112/js/angular.js:7009:13) <div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label ng-binding" ng-bind-html="$group.name"> angular.js:11500 TypeError: undefined is not a function at Function.$$addBindingInfo (http://localhost:1112/js/angular.js:6800:18) at ngBindHtmlLink (http://localhost:1112/js/angular.js:21922:18) at invokeLinkFn (http://localhost:1112/js/angular.js:8141:9) at nodeLinkFn (http://localhost:1112/js/angular.js:7653:11) at compositeLinkFn (http://localhost:1112/js/angular.js:7009:13) at nodeLinkFn (http://localhost:1112/js/angular.js:7648:24) at compositeLinkFn (http://localhost:1112/js/angular.js:7009:13) at compositeLinkFn (http://localhost:1112/js/angular.js:7012:13) at publicLinkFn (http://localhost:1112/js/angular.js:6888:30) at link (http://localhost:1112/js/select.js:1235:42) <div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label ng-binding" ng-bind-html="$group.name">
The text was updated successfully, but these errors were encountered: