1
0
mirror of https://github.com/moparisthebest/mail synced 2024-08-13 16:43:47 -04:00
mail/src/js/controller/add-account.js
Tankred Hase 6adc9da8c1 Cleanup before refactor with ngAnimate
* Add ng-animate module in libs
* Move error dialog init to app.run
* Include error dialog template only once in index.html
* Fix race condition between ng-repeat, ng-class using ng-animate
2014-04-24 15:04:41 +02:00

25 lines
585 B
JavaScript

define(function(require) {
'use strict';
var appController = require('js/app-controller');
var AddAccountCtrl = function($scope, $location) {
$scope.connectToGoogle = function() {
appController._auth.getCredentials({}, function(err) {
if (err) {
$scope.onError(err);
return;
}
redirect();
});
};
function redirect() {
$location.path('/login');
$scope.$apply();
}
};
return AddAccountCtrl;
});