I'm making a GET request to my web api, the url goes like /users/exist/:username
I've created the custom method that works:
RestangularProvider.addElementTransformer('users', true, function(user) {
user.addRestangularMethod('exist', 'get', 'exist');
return user;
});
But I don't know how to add the :username
in the url.
Is it even possible?
来源:https://stackoverflow.com/questions/25426020/custom-restangular-get-method