Like a one-time, if you bind a disabled attribute on your button like this
<button {{action go}} {{bind-attr disabled=actionPerformed}}>
and then configure your controller for example
var FooController = Ember.ObjectController.extend({ actionPerformed: false, actions: { go: function() { this.set("actionPerformed", true); console.log("done!"); } } });
then the button will be disabled after clicking on it.
If you want to use the reusable component, I would borrow the spinner button from http://emberjs.com/guides/cookbook/helpers_and_components/spin_button_for_asynchronous_actions/ and configure it as needed.
So your JS will be down the line
window.SpinEg = Ember.Application.create({}); SpinEg.ApplicationController = Ember.Controller.extend({ isLoading:false, buttonText:"Submit", actions:{ saveData:function(){ var self = this; var saveTime = Ember.run.later(function(){ self.set('isLoading', false); }, 1000); } } }); SpinEg.SpinButtonComponent = Ember.Component.extend({ classNames: ['button'], buttonText:"Save", isLoading:false, actions:{ showLoading:function(){ if(!this.get('isLoading')){ this.set('isLoading', true); this.sendAction('action'); } } } });
The template for your component will be
<script type='text/x-handlebars' id='components/spin-button'> <button {{bind-attr id=id}} {{action 'showLoading'}}> {{#if isLoading}} <img src="http://i639.photobucket.com/albums/uu116/pksjce/spiffygif_18x18.gif"></img> {{else}} {{buttonText}} {{/if}} </button> </script>
and then you just include the following, where you need a button to display
<script type='text/x-handlebars' id='application'> {{spin-button id="forapplication" isLoading = isLoading buttonText=buttonText action='saveData'}} </script>