-
-
+
+
+
diff --git a/js/controllers/LoginController.js b/js/controllers/LoginController.js
index e69de29..7170300 100644
--- a/js/controllers/LoginController.js
+++ b/js/controllers/LoginController.js
@@ -0,0 +1,22 @@
+angular.module('Come2HelpApp')
+.controller('LoginController', ['$auth', '$location', function($auth, $location) {
+ var vm = this;
+
+ vm.credentials = {};
+
+ vm.login = function() {
+ // User transport object
+ var transUser = {
+ email: vm.user.email || '',
+ password: vm.user.password || ''
+ };
+ $auth.login(transUser);
+ };
+
+ vm.authenticated = $auth.isAuthenticated.bind($auth);
+
+ vm.logout = function() {
+ $auth.removeToken();
+ $location.path('/');
+ };
+}]);
\ No newline at end of file
diff --git a/js/controllers/NavigationController.js b/js/controllers/NavigationController.js
deleted file mode 100644
index dbb4801..0000000
--- a/js/controllers/NavigationController.js
+++ /dev/null
@@ -1,10 +0,0 @@
-angular.module('Come2HelpApp')
-.controller('NavigationController', ['$auth', '$location', function($auth, $location) {
- var vm = this;
-
- vm.authenticated = $auth.isAuthenticated.bind($auth);
- vm.logout = function() {
- $auth.removeToken();
- $location.path('/');
- };
-}]);
\ No newline at end of file