diff --git a/qbaka-angular.js b/qbaka-angular.js index 686ec19..d0d1cd8 100644 --- a/qbaka-angular.js +++ b/qbaka-angular.js @@ -38,9 +38,13 @@ window.qbaka.angular = function (module, apiKey) { trackEvents: true }; } + + // Argument can be string or an angular module + module = typeof module === 'string' ? angular.module(module):module) + module.factory('$exceptionHandler', function () { return function (exception) { qbaka.report(exception); }; }); -}; \ No newline at end of file +};