Generic Modal for deleting items
When deleting something, we usually want to show some confirmation to make sure the user actually wants to delete and didn't misclick. Because this is common behaviour, and shouldn't change drastically from different use cases, we've created the goten-ngmodal-delete package.
You must have ng-bootstrap installed
$ npm install -s goten-ngmodal-delete
|service (required)||Any Angular service||The service to use for deleting the element|
|dataToDelete (required)||String||Parameter to identify the element we want to delete|
|nameMethodDelete||String||The service's delete method name. By default, it uses the name 'delete'|
|onConfirm||Function||Callback when pressing 'Confirm'. The service sends a response by parameter (see example above)|
|onCancel||Function||Callback when pressing 'Cancel'|
|textShow||Object||title ("Delete" by default), message ("
To contribute with this package, we use the following workflow:
- Add an issue with related tags to describe the contribution (is it a bug? a feature request?).
- Branch your solution from develop, naming it like #<issue_number>-<descriptive_name>.
- Send a pull request and wait for approval/corrections.