submit-button
is a small Ember component that has a handy list of features. Pass it the ember-data
model being edited in a form and it will:
- Dynamically determine button text. (eg: if the model is an existing Post, the button text will be: Update Post)
- Automatically disable the button while the model
isSaving
- Automatically change button text to Saving... while model
isSaving
ember install ember-submit-button
The model to observe. If save()
has been triggered on the model, component will automatically disable to the button so it cannot be clicked again.
Default: null
Passing in a disable
value will cause the component to ignore the model
attribute all together. The component will watch this attribute and update accordingly.
Default: Saving
A custom action to fire on click.
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.