promiseMessages module provides enhanced support for displaying messages depending on some promise within templates.
install via npm
install via bower
promiseMessages as dependency in your module:
Basic usage (listening promise)
Function support (listening promise that is returned by function)
Use the attribute
forAction when you want to specify a function that returns promise.
states attribute is specified, states will be published into related scope.
Then, you can theme it as you want by using published states.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D