diff options
| author | ARC <arjunrc@gmail.com> | 2015-05-11 16:22:57 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-05-11 16:22:57 -0400 |
| commit | b2367f35e32fad3f2383b9e124df87211f669b59 (patch) | |
| tree | b5413f011afb697c80db98b011d19149272da432 /www/js/app.js | |
| parent | ff36c7d3135246ce68f782cabf6d92a3f762d2fd (diff) | |
nits - not much to describe
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js index e1c724b5..2769e73d 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -17,6 +17,7 @@ angular.module('zmApp', [ // via img tags where this directive is added (I am using this in // events and mionitor view to show a loader while the image is // downloading from ZM + .directive('imageonload', function () { return { restrict: 'A', @@ -46,9 +47,38 @@ angular.module('zmApp', [ //console.log("*** HTTP INTERCEPTOR CALLED ***"); return config; } + + }; }) +/* For future use - does not work with img src intercepts +.factory ('httpAuthIntercept', function ($rootScope, $q) +{ + return { + requestError: function (response) { + console.log ("**** REJECT REQUEST: "+JSON.stringify(response)); + return $q.reject(response); + }, + + responseError: function (response) { + console.log ("**** REJECT RESPONSE: "+JSON.stringify(response)); + return $q.reject(response); + }, + response: function (response) + { + console.log("*******RESPONSE with status: "+response.status+"****************"); + if (response.status == 500) + { + console.log ("**** RESPONSE: "+JSON.stringify(response)); + } + return (response); + } + }; +}) +*/ + + .run(function ($ionicPlatform, $ionicPopup, $rootScope, $state, ZMDataModel, $cordovaSplashscreen) { ZMDataModel.init(); @@ -145,6 +175,8 @@ angular.module('zmApp', [ .config(function ($stateProvider, $urlRouterProvider, $httpProvider) { $httpProvider.interceptors.push('timeoutHttpIntercept'); + //$httpProvider.interceptors.push('httpAuthIntercept'); + $stateProvider .state('login', { |
