Add directive to show a loading spinner