add directive to show loading animation