ember.js - Show spinner next to navigation link when clicked -
say have few links in navigation:
... {{#linkto 'projects.trending' tagname="li"}} <a href="#" {{bindattr href="view.href"}}> trending projects</a> {{/linkto}} {{#linkto 'projects.all' tagname="li"}} <a href="#" {{bindattr href="view.href"}}> projects</a> {{/linkto}} ...
when click 1 of these links, fetch data via ajax , go route. takes while fetch data, i'd show spinner. have global spinner @ top of page. cool show spinner next navigation link clicked, user sees page loading.
what best/easiest approach implement this?
you put span next each navigation link that's hidden default, , contains spinner. onclick, show span. hide of them after ajax done.
Comments
Post a Comment