This is a simple demo of how to create and use a Response Interceptor in AngularJS. In this case we are using the interceptor to convert the objects created from a JSON data load into typed instances of a custom "class".
xxxxxxxxxx
<html lang="en" ng-app="app">
<head>
<meta charset="utf-8">
<title>AngularJS Response Interceptor Demo</title>
</head>
<body>
{{msg1}}
<br/>
{{msg2}}
<br/>
{{msg3}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js"></script>
<script src="app.js"></script>
</body>
</html>
Modified http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js to a secure url
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js