Material Design Angular md-autocomplete remote

前端 未结 1 1668
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 17:46

In material design autocomplete(https://material.angularjs.org/#/demo/material.components.autocomplete) All examples show how to get data from local variable. There is no he

相关标签:
1条回答
  • 2020-12-09 18:08

    You just need to use a function that returns a promise in md-items. See this plunk: http://plnkr.co/edit/KFQg53ZVfPAMum0dFctK?p=preview

    NOTE: Returned promises from $http will be resolved with an object that has the data. So you have to do something like this:

        return $http.get(url).then(function(response){
             return response.data.someOtherPathMaybe; // usually response.data
        })
    
    0 讨论(0)
提交回复
热议问题