confirm-message-directive
v1.0.1
Published
AngularJS confirm message directive
Downloads
1
Maintainers
Readme
AngularJS confirm message directive
Useful links
Requirements
- Bootstrap css included to your index.html
Installation Methods
npm
$ npm install confirm-message-directive
bower
$ bower install confirm-message-directive
Add Dependency
// Regular angularjs
// First of all add script `../dev-team-confirm-message/dist/dev-team-confirm-message.min.js` to your `index.html` file
// And then add it as module dependency
angular.module('myApp', ['dev-team-confirm-message', ...])
// requirejs
define(['angular', 'dev-team-confirm-message'], function(angular) {...});
// commonjs
var angular = require('angular');
angular.module('app', [require('dev-team-confirm-message'), ....])
How to use
In HTML:
<dt-confirm-message></dt-confirm-message>
<dt-confirm-link text="Click me!"
message="Message"
note="Some info note"
confirm-action="confirm()"
cancel-action="cancel()">
</dt-confirm-link>
confirmAction/cancelAction can be async functions that return promise, or can be regular function with some logic
Supported attributes
text
: Text that will be displayed on the buttonmessage
: Message that will be displayed on the shown elementnote
: Text that will be displayed in body of confirm messageconfirm-action
: Function that will be invoked on confirm click. Can be asynccancel-action
: Function that will be invoked on cancel click. Can be async
Feedback
Please leave your feedback if you have noticed any issues or have a feature request.
License
The repository code is open-sourced software licensed under the MIT license.