I have a simple controller, for example:
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 out / ** * / for security reasons. With jQuery, I extended the $ .ajax object to remove these comments and then parse the result. I would like to achieve the same with AngularJS and somehow say $ http to remove comments from each answer. I want to do this for my entire application and not always type the same thing.
Any ideas how I can do this?
source share