{"action":"created","issue":{"url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1652","labels_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1652/labels{/name}","comments_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1652/comments","events_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1652/events","html_url":"https://github.com/mgcrea/angular-strap/issues/1652","id":69142449,"number":1652,"title":"TypeError: scope.$activeIndex.indexOf is not a function","user":{"login":"nicklasb","id":8634663,"avatar_url":"https://avatars.githubusercontent.com/u/8634663?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklasb","html_url":"https://github.com/nicklasb","followers_url":"https://api.github.com/users/nicklasb/followers","following_url":"https://api.github.com/users/nicklasb/following{/other_user}","gists_url":"https://api.github.com/users/nicklasb/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklasb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklasb/subscriptions","organizations_url":"https://api.github.com/users/nicklasb/orgs","repos_url":"https://api.github.com/users/nicklasb/repos","events_url":"https://api.github.com/users/nicklasb/events{/privacy}","received_events_url":"https://api.github.com/users/nicklasb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-17T13:47:04Z","updated_at":"2015-05-15T20:03:11Z","closed_at":"2015-04-18T00:51:40Z","body":"Hi, \r\n\r\nI have this strange problem. I am trying to make [angular-schema-form-dynamic-select](https://github.com/OptimalBPM/angular-schema-form-dynamic-select/tree/angular-strap_221_compat) work with 2.2.1. \r\n\r\nI have two identical selects, one loads the items dynamically in an ng-init, as shown below, and the other gets them preloaded in a variable.\r\nThe *only* difference between the two is the `ng-init=\"fetchResult(form.options)\"`.\r\n If I have the items in a variable, it works, if I load them dynamically as displayed, I am rewarded with the error message further down when I click the drop down.\r\n\r\nThe dropdown is displayed, and all items are there, but clicking them results in nothing.\r\n\r\n(if your eyes are drawn to [$$value$$ i *think* that is not relevant here](https://github.com/Textalk/angular-schema-form/blob/development/docs/extending.md#the-magic-value), as that is present on both alternatives, I have also tried removing filters and stuff like that)\r\n\r\n    <div ng-init=\"mainScope=this.$parent.$parent;\" class=\"form-group {{form.htmlClass}}\"\r\n         ng-class=\"{'has-error': hasError(), 'has-success': hasSuccess()}\">\r\n        <label class=\"control-label {{form.labelHtmlClass}}\" ng-show=\"showTitle()\">{{form.title}}</label>\r\n    \r\n        <div class=\"form-group {{form.fieldHtmlClass}}\" ng-controller=\"StrapSelectController\" ng-init=\"fetchResult(form.options)\">\r\n            <button type=\"button\" class=\"btn btn-default\" sf-changed=\"form\" schema-validate=\"form\" ng-model=\"$$value$$\"\r\n                    data-placeholder=\"{{form.placeholder || form.schema.placeholder || ('placeholders.select')}}\" data-html=\"1\" data-multiple=\"1\"\r\n                    bs-options=\"item.value as item.text for item in form.items | selectFilter:form:mainScope:this\"\r\n                    bs-select>\r\n            </button>\r\n            <span class=\"help-block\">{{ (hasError() && errorMessage(schemaError())) || form.description}}</span>\r\n        </div>\r\n    </div>\r\n\r\n\r\nThe error:\r\n    \r\n    TypeError: scope.$activeIndex.indexOf is not a function\r\n        at Object.angular.module.provider.$get.$select.$isActive (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:3376:39)\r\n        at Scope.angular.module.provider.$get.scope.$isActive (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:3296:26)\r\n        at $parseFunctionCall (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular/angular.js:12404:18)\r\n        at extend.&& (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular/angular.js:11804:66)\r\n        at Object.$parseBinaryFn [as get] (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular/angular.js:12130:14)\r\n        at Scope.$get.Scope.$digest (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular/angular.js:14300:40)\r\n        at safeDigest (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:5211:72)\r\n        at angular.module.provider.$get.$tooltip.hide (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:4802:11)\r\n        at Object.angular.module.provider.$get.$select.hide (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:3455:11)\r\n        at HTMLButtonElement.angular.module.provider.$get.$tooltip.leave (http://localhost:63342/angular-schema-form-dynamic-select/bower_components/angular-strap/dist/angular-strap.js:4772:29)\r\n      (anonymous function)\t\r\n      $get\t\r\n      $get.Scope.$digest\t\r\n      safeDigest\t\r\n      angular.module.provider.$get.$tooltip.hide\t\r\n      angular.module.provider.$get.$select.hide\t\r\n      angular.module.provider.$get.$tooltip.leave\t\r\n      eventHandler\t\r\n\r\n\r\nI have seen that other have gotten the same error message when navigating.\r\nAnyway, this did not happen in 2.1.6. \r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/mgcrea/angular-strap/issues/comments/102510205","html_url":"https://github.com/mgcrea/angular-strap/issues/1652#issuecomment-102510205","issue_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1652","id":102510205,"user":{"login":"nicklasb","id":8634663,"avatar_url":"https://avatars.githubusercontent.com/u/8634663?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklasb","html_url":"https://github.com/nicklasb","followers_url":"https://api.github.com/users/nicklasb/followers","following_url":"https://api.github.com/users/nicklasb/following{/other_user}","gists_url":"https://api.github.com/users/nicklasb/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklasb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklasb/subscriptions","organizations_url":"https://api.github.com/users/nicklasb/orgs","repos_url":"https://api.github.com/users/nicklasb/repos","events_url":"https://api.github.com/users/nicklasb/events{/privacy}","received_events_url":"https://api.github.com/users/nicklasb/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T20:03:11Z","updated_at":"2015-05-15T20:03:11Z","body":"Related to this?\r\nhttps://github.com/mgcrea/angular-strap/issues/1654"}}