An angular directive to detect a click outside of an elements scope