Open DevQueen opened 7 years ago
I am unable to get the AutoComplete list to display. My service returns json model: TagID: 1, text:MyText but the AutoComplete list never displays. My HTML:
`
</tags-input>`
My Controller Code:
$scope.loadTags = function ($query) { var tags; contractorService.gettags() .success(function (data) { tags = data; tags.filter(function(tag) { return tag.text.toLowerCase().indexOf($query.toLowerCase()) != -1; }); }); };
What I have discovered is that for some reason it does not like the Json returned from the Ajax call to my ASP.NET MVC Controller
public async Task<ActionResult> GetMajorTags() { majorId = UserInfo.intMajorID; var tags = await CompanyClient.GetAvailableTags(majorId); return Json(tags, JsonRequestBehavior.AllowGet); }
Even using it like below without going through my service:
$scope.loadTags = function (query) { $http.get('/SSQV4/SSQV5/Contractor/GetMajorTags') .then(function(res) { return res.data; }); };
It will not display the list even though the data comes back in EXACTLY the same format from each.
I've had the same issue, it's very frustrating.
I am unable to get the AutoComplete list to display. My service returns json model: TagID: 1, text:MyText but the AutoComplete list never displays. My HTML:
`
My Controller Code:
What I have discovered is that for some reason it does not like the Json returned from the Ajax call to my ASP.NET MVC Controller
Even using it like below without going through my service:
It will not display the list even though the data comes back in EXACTLY the same format from each.