Restangular call service as query string parameters angularjs

How to call a service as query string(like shown below) parameters in angularjs??


Get to know what is restangular here


var getDetails = function(application, location, product) {
return $q(function(resolve, reject){
var params = {
product: product,
location: location,
};‘servicename’).customPOST(application, “”, params, {}).then(function(response){
console.log(“servicename”, response);

}, function(reason){
reject(‘Problem submitting the application. Reason: ‘ + reason);

Now in controller where ever you should call this getDetails method. Just add ApplicationService as dependency injection. Thats it, you can run your application and check response in console.log after service call.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s