응용 프로그램에 대한 API를 제공하기 위해 루프백을 사용하고 일부 데이터에 대한 GET 요청을 변경하려고했습니다. 이미 where 절에 따옴표를 추가하거나 .find({ where : { town : 'name of a town' }}
처럼 뭔가를 시도했다loopback Find() "where 절이 예상 된 결과를 반환하지 않습니다.
People
.find({ where : {'town' : 'name of a town'}})
.$promise
// Promise is fulfilled and people returned
.then(function(results){
$scope.people = results;
})
// Promise is rejected and error catched
.catch(function(err){
$scope.errors.PeopleFind = JSON.stringify(err.data.error.message
? err.data.error.message
: err.data.error.errmsg
);
});
: 현재로
이제 쿼리는 특정 API에 대한 모든 결과를 가져옵니다. 따옴표를 어디에 넣든 결과는 항상 전체 패키지입니다. 내가 관심있는 결과 만 검색하려면 어떻게해야합니까? 나는의 동료에 대한 답 덕분에 발견
이미 프로그래밍 된 끝점과 후크가있는 프런트 엔드에서 수행됩니다. – mnemosdev