created directives and a  event to the mainmenu controller