mirror of
https://github.com/fergalmoran/roboto-promoto.git
synced 2025-12-22 01:30:36 +00:00
27 lines
633 B
JavaScript
27 lines
633 B
JavaScript
'use strict';
|
|
|
|
angular.module('robotoPromotoApp')
|
|
.controller('HeaderCtrl', 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();
|
|
};
|
|
});
|