this is my html code
<input type="text" ng-model="ngModelOptionsSelected"
placeholder="Enter Story Title"
ng-model-options="modelOptions"
ng-change="onChangeFunction()"
typeahead-on-select="typeaheadOnSelectFunction()"
uib-typeahead="document as document.Name for document in getStory($viewValue)"
class="form-control">
this is my .js code
$scope.getStory = function (val) {
storyService.GetStoryByName(cacheService.project.projectId,val).success(function (data) {
if (data.ResponseStatus) {
debugger;
return data.ResponseData;
} else {
//On failure
toastr.error(data.ErrorData.Error);
}
});
};
function output which returns data like ResponseData =
[{"Id":211380.0,"Name":"dixit"},{"Id":211488.0,"Name":"dixit ade"},{"Id":251541.0,"Name":"dixit"},{"Id":842671.0,"Name":"dixit"},{"Id":842672.0,"Name":"dixit choksi"}]
but i am not able to bind data in typeahead.
please help me i am stuck. thanks