angular.module('agileApp').controller('LoginController', ['$scope', 'UserAuthService', '$window', 'BackendService', '$rootScope', function($scope, userAuthService, $window, backend, $rootScope) { $rootScope.bodyClass = ''; $window.onfocus = null; $scope.login = function() { $window.ga('send', 'event', 'login button', 'clicked'); userAuthService.startoauthSignin(); } $scope.isEndpointsReady = function() { return backend.isEndpointsReady; } }])