how to write condition inside of url of http.post method angularjs code example
Example: angularjs make post request
var url = 'posturl', data = 'parameters',config='contenttype';
$http.post(url, data, config).then(function (response) {
// This function handles success
}, function (response) {
// this function handles error
});