Refactored the directive so that toggling the sidebar
doesn't manipulate the dom, instead it sets a property on
the interested scopes.