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.

24 lines
780 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, $rootScope, $http, $routeParams, $location) {
  10. $rootScope.server = JSON.parse(localStorage.getItem("old_darkID_server"));
  11. $scope.user = JSON.parse(localStorage.getItem("old_darkID_user"));
  12. $scope.logout = function() {
  13. localStorage.removeItem("old_darkID_token");
  14. localStorage.removeItem("old_darkID_user");
  15. localStorage.removeItem("old_darkID_server");
  16. window.location.reload();
  17. };
  18. });