Skip to content

Instantly share code, notes, and snippets.

@koenoe
Last active February 11, 2016 10:25
Show Gist options
  • Save koenoe/ea754b7cb52000b02074 to your computer and use it in GitHub Desktop.
Save koenoe/ea754b7cb52000b02074 to your computer and use it in GitHub Desktop.
(function() {
'use strict';
angular
.module('app.block.logger')
.provider('$rollbar', RollbarProvider);
RollbarProvider.$inject = ['$windowProvider'];
function RollbarProvider($windowProvider) {
var $window = $windowProvider.$get();
var provider = this;
this.init = function(config){
provider.config = config;
$window.Rollbar.init(config);
};
this.$get = function(){
if(!provider.config){
return false;
}
return $window.Rollbar;
};
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment