md-items is not updating the suggesion list properly in md-autocomplete Angular Material

前端 未结 1 342
时光说笑
时光说笑 2021-01-06 06:56

I\'m using md-autocomplete, in that md-items which is not updating the response list properly which is obtained from the Service Host - Ajax Call.

HTML Source Code

相关标签:
1条回答
  • 2021-01-06 07:45

    The Answer Marked in the following post is Correct as per the requirement. $http issue - Values can't be returned before a promise is resolved in md-autocomplete Angular Material

    • .then() - full power of the promise API but slightly more verbose
    • .success() - doesn't return a promise but offers slightly more convenient syntax

    Don't use .success(), use .then to get the updated result in the UI...

    0 讨论(0)
提交回复
热议问题