Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 6cfa74e

Browse files
committed
Auth service
Added the $window, no need of _this.
1 parent 2bba82e commit 6cfa74e

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
'use strict';
22

33
// Authentication service for user variables
4-
angular.module('users').factory('Authentication', [
5-
function() {
6-
var _this = this;
7-
8-
_this._data = {
9-
user: window.user
10-
};
11-
12-
return _this._data;
13-
}
14-
]);
4+
angular.module('users').factory('Authentication', ['$window', function($window) {
5+
var auth = {
6+
user: $window.user
7+
};
8+
9+
return auth;
10+
}]);

0 commit comments

Comments
 (0)