added directive as an attribute to the html
added logic to add the active class when toggled