I have a simple controller, like:
function MyController($scope, $http) {
...
$http.post(url).success(function(data) {
console.log(data)
});
}
MyController.$inject = ['$scope', '$http'];
Everything works as expected, but I have a problem. The returning JSON is commented with /** */ for security reasons. With jQuery I have extended the $.ajax object to remove this comments and then parse the result. I would like to achieve the same with AngularJS and somehow tell $http to remove the comments from each response too. I want to do this for my whole application and avoid typing always the same.
Any ideas how I can do that?