angular.module('menuDirective',[])
.directive('menuAdmin', function(){
  var menu = {};

  menu.restrict = "AE";

  menu.scope = {
    name: '@name',
    dock: '@dock'
  };

  menu.templateUrl = 'js/directive/template/menu.html';

  return menu;
})
.directive('linkExit', function(){
  var sair = {};

  sair.restrict = "AE";

  sair.link = function($scope, $element, $attrs){
    $element.bind('click', function(){
      delete sessionStorage.token;
      delete sessionStorage.name;
      delete sessionStorage.dock;
    });
  };

  sair.templateUrl = 'js/directive/template/exit.html';

  return sair;
});
