6
angularJS의 $ httpBackend에 URL 매개 변수를받을 수 있습니까? (프런트 엔드 응용 프로그램을 개발하기 쉬운 전체 백엔드를 실행하지 않고)
$httpBackend.whenGET('/api/v1/users/{userId}').respond(function (method, url, data) {
// somehow read {userId} and act differently depending on what the value is
return [200];
});
정말 쉽게 오히려 기능 모의 API를 만들 수 것이 기능을 갖는 : 내가 좋아하는 일을하고 싶습니다.
감사합니다. 누구나 그 목적을 위해 RegExp를 필요로합니다./^/items/\ d $/ 도움이되기를 바랍니다. –