
"use strict";

class LoginController {

    constructor(AuthenticationService, $location) {
        this.service = AuthenticationService;
        this.location = $location;
    }

    attempt() {
        this.service.login(this.username, this.password).success(result => {
            this.location.path('/');
        });
    }

};

LoginController.$inject = ['AuthenticationService', '$location'];

export {LoginController};



"use strict";

let service;
let loc;

class LoginController {

    constructor(AuthenticationService, $location) {
        service = AuthenticationService;
        loc = $location;
    }

    attempt() {
        service.login(this.username, this.password).success(result => {
            loc.path('/' + this.language + '/');
        });
    }

};

LoginController.$inject = ['Authentication.Service', '$location'];

export {LoginController};


improve es6 coding style