mirror of
https://github.com/moparisthebest/mail
synced 2024-08-13 16:43:47 -04:00
6adc9da8c1
* 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
25 lines
585 B
JavaScript
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;
|
|
}); |