refactor(bs3): misc

This commit is contained in:
Matteo Pagliazzi
2014-02-03 19:24:37 +01:00
parent 56133894d8
commit cdc13d2ffb
6 changed files with 30 additions and 77 deletions
+4 -6
View File
@@ -5,8 +5,8 @@
*/
angular.module('authCtrl', [])
.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','API_URL', '$modal',
function($scope, $rootScope, User, $http, $location, $window, API_URL, $modal) {
.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','API_URL',
function($scope, $rootScope, User, $http, $location, $window, API_URL) {
var runAuth;
var showedFacebookMessage;
@@ -71,10 +71,8 @@ angular.module('authCtrl', [])
if (User.authenticated()) {
window.location.href = '/#/tasks';
} else {
$modal.open({
templateUrl: 'modals/login.html'
// Using controller: 'AuthCtrl' it causes problems
});
// Using controller: 'AuthCtrl' it causes problems
$rootScope.openModal('login');
}
}