3 angular.module('dashboardApp')
4 .controller('LoginCtrl', function($scope, Auth, $state, $window) {
8 $scope.login = function(form) {
9 $scope.submitted = true;
13 email: $scope.user.email,
14 password: $scope.user.password
17 // Logged in, redirect to home
20 .catch(function(err) {
21 $scope.errors.other = err.message;
26 $scope.loginOauth = function(provider) {
27 $window.location.href = '/auth/' + provider;