-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Typeahead: undefined is not a function after selecting a value #1149
Comments
The problem is that your Also, I tried without remote data: $scope.getCompany = function (q) {
return [
{
id: 1,
name: 'test'
},
{
id: 2,
name: 'test2'
},
{
id: 3,
name: 'test3'
},
{
id: 4,
name: 'test4'
}
];
}; It's OK, no error... |
Could be related to ocombe/ocLazyLoad#71 |
I have a similar probably, async loading of data objects. Options are displayed correctly, but selecting one throws an error:
Seems that AngularStrap is execting the selected to be an object with either a var selected = angular.isDefined(index) ? typeahead.$scope.$matches[index].label : controller.$viewValue;
if(_.isUndefined(selected.label)){
selected.label = selected.name
} In my case it's a |
I don't know where that AngularStrap code you included comes from. Maybe you are using an old version of the library? Please update AngularStrap and check again. If you still have a problem, please open a new issue with a plunker replicating the problem if possible. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
It works, but a little error happens after selecting a value.
I have my values, when I click on any, the input is well filled. But,
This line:
I did
console.log(selected);
before and:1
is the company id. It could be related to #1122...Any help appreciated.
The text was updated successfully, but these errors were encountered: