diff --git a/angular/app/components/login-form/login-form.component.html b/angular/app/components/login-form/login-form.component.html
index 2b12e81..dfba7e4 100644
--- a/angular/app/components/login-form/login-form.component.html
+++ b/angular/app/components/login-form/login-form.component.html
@@ -1,15 +1,17 @@
-
-
-
-
-
-
+
diff --git a/angular/app/components/login-form/login-form.component.js b/angular/app/components/login-form/login-form.component.js
index c07da46..f877486 100644
--- a/angular/app/components/login-form/login-form.component.js
+++ b/angular/app/components/login-form/login-form.component.js
@@ -1,17 +1,29 @@
-class LoginFormController{
- constructor(){
- 'ngInject';
+class LoginFormController {
+ constructor($auth) {
+ 'ngInject';
- this.email = '';
- this.password = '';
- }
+ this.$auth = $auth;
+
+ this.email = '';
+ this.password = '';
+ }
+
+ login() {
+ var user = {
+ email: this.email,
+ password: this.password
+ };
+
+ this.$auth.login(user)
+ .then((response) => {
+ this.$auth.setToken(response.data.data.token);
+ });
+ }
}
export const LoginFormComponent = {
- templateUrl: './views/app/components/login-form/login-form.component.html',
- controller: LoginFormController,
- controllerAs: 'vm',
- bindings: {}
+ templateUrl: './views/app/components/login-form/login-form.component.html',
+ controller: LoginFormController,
+ controllerAs: 'vm',
+ bindings: {}
}
-
-
diff --git a/angular/app/pages/header/header.page.html b/angular/app/pages/header/header.page.html
index bdff2b1..123a560 100644
--- a/angular/app/pages/header/header.page.html
+++ b/angular/app/pages/header/header.page.html
@@ -2,7 +2,7 @@