AngularJS RESTful params -
is possible use angularjs $http service parameterize restful url? example:
var url = '/api/countries/:countryid/states' var getstates = function (countryid) { $http.get(url, { countryid: countryid }).then(); }; every combination try ends using query string, not want.
i don't think possible in way describe.
in end you'll want go following:
var getstates = function (countryid) { var url = '/api/countries/'+countryid+'/states' $http.get(url, {}).then(); }; though if has better solution i'd love hear :)
Comments
Post a Comment