Can ng-show directive be used with a delay
问题 I have a spinner this is shown with ng-show="loading>0" Is there a way I can display this spinner with a delay (say 1 second)? I can't use a timeout because with multiple requests de loading counter will get out of sync. What I need is a delay on the ng-show via css transition or similar 回答1: Here's a simpler approach that worked for my needs. Depending on what your action is, you would tie function setDelay() to the element. For example, in my case I tied setDelay() to a select input.