You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
609 B

  1. 'use strict';
  2. angular.module('app.navbar', ['ngRoute'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/navbar', {
  5. templateUrl: 'views/navbar.html',
  6. controller: 'NavbarCtrl'
  7. });
  8. }])
  9. .controller('NavbarCtrl', function($scope, $http, $routeParams, $location) {
  10. $scope.user = JSON.parse(localStorage.getItem("blid_user"));
  11. $scope.logout = function() {
  12. localStorage.removeItem("blid_token");
  13. localStorage.removeItem("blid_user");
  14. window.location.reload();
  15. };
  16. });