angularjs - Is it possible to use parameterized URL templates with angular $http service -
i'm using $resource restful api's , love parameterized url template example 'api/clients/:clientid' this works great crud operations. of api's reports or read-only end points without need full restful treatment. felt overkill use $resource , instead used custom data service $http. the drawback lose parameterized url templates. love define url like 'api/clients/:clientid/orders/:orderid' , pass { clientid: 1, orderid: 1 } . realize can build url dynamically hoping $http supported parameterized template , haven't found yet. all best update 7/5 the word missing in searches 'interpolate'. more information comes when search 'url interpolation in angular $http'. short answer looks 'no' $http doesn't support url interpolation. there few easy ways accomplish however. 1. use $interpolate: documentation $interpolate here var exp = $interpolate('/api/clients/{{clientid}}/jobs/{{jobid}}', false, null, true);