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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -