Fixed BeforeUnload Binder Call in ProdMode
authorFulup Ar Foll <fulup@iot.bzh>
Tue, 16 Feb 2016 17:34:21 +0000 (18:34 +0100)
committerFulup Ar Foll <fulup@iot.bzh>
Tue, 16 Feb 2016 17:34:21 +0000 (18:34 +0100)
afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js

index c4a086e..59fc763 100644 (file)
 // scope module is load statically before any route is cativated
 angular.module('TokenRefresh', ['AppConfig', 'ModalNotification'])
 
-    .directive ('tokenRefresh', function($window, $timeout, $location, Notification, AppConfig, AppCall) {
+    .directive ('tokenRefresh', function($log, $window, $timeout, $location, Notification, AppConfig, AppCall) {
 
     function mymethods(scope, elem, attrs) {
         scope.logged=undefined; // neither thu neither false
         
         $window.onbeforeunload = function () {
-            AppCall.get ("token", "reset", {/*query*/}, function () {
-            console.log("OPA Exit Requested");                
+            AppCall.get ("token", "reset", {/*query*/}, function () {    
+            $log.log("OPA exit");            
             });
         };
                  
@@ -133,4 +133,3 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification'])
 
 })();
 console.log ("Token Refresh Loaded");
-