Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

md-autocomplete : $http promise fails to work #1798

@kschwidder

Description

@kschwidder

When the items are returned from an $http promise the md-autocomplete fails to work.
From a $http promise the data items are returned as response.data. md-autocomplete expects the data is passed back as an array.
The array is contained in the response.data object but md-autocomplete is reading response as the array which fails.

$scope.loadSkillTags = function (query) {
    var data = {qData: query};
    return SkillService.querySkills(data);
};
<md-autocomplete
         md-selected-item="data.selectedItem"
         md-search-text="data.searchText"
         md-items="item in loadSkillTags(data.searchText)"
         md-item-text="item"
         placeholder="Talent">
     <span md-highlight-text="data.searchText">{{item.name}}</span>
 </md-autocomplete>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions