且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在AngularJS应用程序中使用预输入和Ajax

更新时间:2023-02-26 08:31:55

您需要实际的收益的从你的品牌功能的承诺。试试这个:

You need to actually return a promise from your brands function. Try this:

$scope.brands = function(brandName){
       return $http.post('/brands/getbrandsviewmodel', { query : brandName})
                     .then(function(response){
                        return limitToFilter(response.data, 15);
                      });
    };