www/app/components/authentication/controllers/signinController.js
/**
     * @desc Controllers of ProvisionalPlans
     * @namespace LoginController
     * @memberOf Controllers
     */
@desc Controllers of ProvisionalPlans
@namespace LoginController
@memberOf Controllers
@desc Controllers of ProvisionalPlans @namespace LoginController @memberOf Controllers
function LoginController($rootScope, $scope, $state, authenticateWebApi) {
        (function init() {
            defineScope();
            defineListeners();
        })();
        function defineScope() {
            $scope.loginForm = {
                email: '',
                password: ''
            };
        }
        function defineListeners() {
            $scope.signin = _signin;
        }
        function _signin() {
            $scope.loginForm.email = $scope.loginForm.email.toLowerCase();
            authenticateWebApi.signin($scope.loginForm).then(function () {
                $state.go('app.provisionalPlans');
            }, function (err) {
                $rootScope.error = 'Une erreur est survenue : ' + err;
                $state.go('signin');
            });
        }
    }
function LoginController ( $rootScope , $scope , $state , authenticateWebApi ) { ( function init ( ) { defineScope ( ) ; defineListeners ( ) ; } ) ( ) ; function defineScope ( ) { $scope . loginForm = { email : '' , password : '' } ; } function defineListeners ( ) { $scope . signin = _signin ; } function _signin ( ) { $scope . loginForm . email = $scope . loginForm . email . toLowerCase ( ) ; authenticateWebApi . signin ( $scope . loginForm ) . then ( function ( ) { $state . go ( 'app.provisionalPlans' ) ; } , function ( err ) { $rootScope . error = 'Une erreur est survenue : ' + err ; $state . go ( 'signin' ) ; } ) ; } }
@desc Controllers of ProvisionalPlans
 @namespace LoginController
 @memberOf Controllers
@desc Controllers of ProvisionalPlans @namespace LoginController @memberOf Controllers
/**
         * @desc Defines all $scope variables
         * @function defineScope
         * @memberOf Controllers.LoginController
         */ /**
         * @desc Attach view listeners to this controller
         * @function defineListeners
         * @memberOf Controllers.LoginController
         */ /**
         * @desc Get the information of form and call webservice to try sign user
         * @function _signin
         * @memberOf Controllers.LoginController
         */ //@todo manage error //@todo possibly an event on flashErrorMessage