簡體   English   中英

帶過濾器的矩形查詢

[英]Restangular query with filters

我使用Restangular的查詢出現錯誤,但未返回經過過濾的數據。 我已經嘗試了以下所有方法:

$scope.welcomes = Restangular.all("projects").getList({'name': "g"}).$object;
$scope.welcomes = Restangular.all("projects").customGET("findOne", {"filter[where][title]": "g"});
 $scope.welcomes = Restangular.one("projects").customGET({name: "g"});
 $scope.welcomes = Restangular.all("projects").customGET({name: "g"});

如果您有任何建議可以分享,我非常感謝。

回調函數中的Restangular返回數據作為參數,示例:

Restangular.one('user', $stateParams.id).get().then(function(response) {
            vm.users = response.data;
           // console.log('response.status:' + response.status);
        });

希望對您有所幫助,或者您改善了問題,我會回來的

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM