mirror of
https://github.com/fergalmoran/roboto-promoto.git
synced 2025-12-27 12:10:42 +00:00
24 lines
473 B
JavaScript
24 lines
473 B
JavaScript
'use strict';
|
|
|
|
angular.module('robotoApp')
|
|
.controller('NavbarCtrl', function ($scope, $location, Auth) {
|
|
$scope.menu = [{
|
|
'title': 'Home',
|
|
'link': '/'
|
|
}, {
|
|
'title': 'Settings',
|
|
'link': '/settings'
|
|
}];
|
|
|
|
$scope.logout = function() {
|
|
Auth.logout()
|
|
.then(function() {
|
|
$location.path('/login');
|
|
});
|
|
};
|
|
|
|
$scope.isActive = function(route) {
|
|
return route === $location.path();
|
|
};
|
|
});
|