Skip to content

Commit

Permalink
Merge pull request #1020 from JGreenlee/fix-annotations-logger
Browse files Browse the repository at this point in the history
🚑 Fix Angular Annotations in logger.ts
  • Loading branch information
shankari authored Aug 22, 2023
2 parents b13fd3f + 50bbd80 commit b9508cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions www/js/plugin/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import angular from 'angular';

angular.module('emission.plugin.logger', [])

.factory('Logger', function($window, $ionicPopup) {
// explicit annotations needed in .ts files - Babel does not fix them (see webpack.prod.js)
.factory('Logger', ['$window', '$ionicPopup', function($window, $ionicPopup) {
var loggerJs: any = {};
loggerJs.log = function(message) {
$window.Logger.log($window.Logger.LEVEL_DEBUG, message);
Expand All @@ -21,7 +22,7 @@ angular.module('emission.plugin.logger', [])
$window.Logger.log($window.Logger.LEVEL_ERROR, title + display_msg);
}
return loggerJs;
});
}]);

export const logDebug = (message: string) =>
window['Logger'].log(window['Logger'].LEVEL_DEBUG, message);
Expand Down

0 comments on commit b9508cc

Please sign in to comment.