-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathapp.js
35 lines (27 loc) · 901 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(function () {
'use strict';
angular.module('demo-app', ['angular-bugsnag'])
.config(['bugsnagProvider', function (bugsnagProvider) {
bugsnagProvider
//.noConflict()
.apiKey('[replace me]')
.releaseStage('development')
.user({
id: 123,
name: 'Jon Doe',
email: '[email protected]'
})
.appVersion('0.1.0');
}])
.controller('MainCtrl', ['$rootScope', 'bugsnag', function ($scope, bugsnag) {
this.throwError = function (err) {
throw err;
};
this.notifyError = function (err) {
bugsnag.notify(err);
};
this.brokenUndefined = function () {
$scope.foo.bar();
};
}])
}());