From db268bd0b731140fc7f99c07e14abf2b199d72f5 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Fri, 1 Jul 2016 11:48:45 +0100 Subject: [PATCH 1/2] Adds explicit annotation to allow strict mode invocation --- angular-appinsights.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-appinsights.js b/angular-appinsights.js index c9ca622..e551a66 100644 --- a/angular-appinsights.js +++ b/angular-appinsights.js @@ -63,7 +63,7 @@ }) - .run(function($rootScope, $route, $location, insights) { + .run(['$rootScope', '$route', '$location', 'insights', function ($rootScope, $route, $location, insights) { $rootScope.$on('$locationChangeSuccess', function() { var pagePath; try { From a044d185f108ca4f1d0a74bd0bfbd3d3d7c3195a Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Wed, 4 Jan 2017 19:09:01 +0000 Subject: [PATCH 2/2] Added missing closing bracket to strict mode invocation --- angular-appinsights.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/angular-appinsights.js b/angular-appinsights.js index e551a66..f569d3f 100644 --- a/angular-appinsights.js +++ b/angular-appinsights.js @@ -17,7 +17,7 @@ if (appInsights && appId && appInsights.start) { appInsights.start(appId); - } + } if (appInsights && appId && !appInsights.start) { appInsights=appInsights({ instrumentationKey: appId }); @@ -28,10 +28,10 @@ function Insights () { var _logEvent = function (event, properties, property) { - + if (appInsights && _appId && appInsights.logEvent) { appInsights.logEvent(event, properties, property); - } + } if (appInsights && _appId && appInsights.trackEvent){ appInsights.trackEvent(event, properties, property); } @@ -39,7 +39,7 @@ }, _logPageView = function (page) { - + if (appInsights && _appId && appInsights.logPageView) { appInsights.logPageView(page); } @@ -74,6 +74,6 @@ insights.logPageView(pagePath); } }); - }); + }]); }());