Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Undefined is not a function - inexplicable error #555

Closed
@turbobuilt

Description

@turbobuilt

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.

<ui-select ng-model="formData.gender" ng-disabled="disabled">
                    <ui-select-match placeholder="Gender">{{$select.selected}}</ui-select-match>
                    <ui-select-choices repeat="genderOption in genders | filter: $select.search">
                        <div>
                            <span class="h1">{{genderOption}}</span>
                        </div>
                    </ui-select-choices>
                </ui-select>

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">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions