Refactor isEnabled to directive and make enabled/disabled checks available on rootscope