Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craftpip/angular-confirm
A multipurpose plugin for alert, confirm & dialog for angular1
https://github.com/craftpip/angular-confirm
alert angular angular-confirm angular-modal angular-model angular-module angular1 dialog javascript-confirm
Last synced: about 1 month ago
JSON representation
A multipurpose plugin for alert, confirm & dialog for angular1
- Host: GitHub
- URL: https://github.com/craftpip/angular-confirm
- Owner: craftpip
- License: mit
- Created: 2016-11-08T07:17:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T15:41:23.000Z (over 5 years ago)
- Last Synced: 2025-01-03T00:09:18.428Z (about 2 months ago)
- Topics: alert, angular, angular-confirm, angular-modal, angular-model, angular-module, angular1, dialog, javascript-confirm
- Language: JavaScript
- Homepage: http://craftpip.github.io/angular-confirm/
- Size: 1.13 MB
- Stars: 115
- Watchers: 12
- Forks: 20
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 
*alerts, confirms and dialogs in* ***one.***v1.1.0
Angular-confirm targets to make it really easy to use confirm dialogs with angular.
With angular-confirm you can harness the angular two-way data binding to update the content as well as make changes to the model in runtime.A re-write of the jquery-confirm v3 plugin with all features.
* Define multiple buttons
* Trigger buttons on key up events
* Beautiful themes and animations
* All modal properties are two-way binded.
* Do things the angular wayView detailed features here [Documentation & Examples](http://craftpip.github.io/angular-confirm)
## Installation
Download the latest release [here](https://github.com/craftpip/jquery-confirm/archive/master.zip) and use the files within the `dist` directory
via Bower:
`$ bower install angular-confirm1`via NPM:
`$ npm install angular-confirm1`##Basic usage
The snippet below shows the most commonly used properties, there are more to find in the docs.
```js
angular.module('myApp', ['cp.ngConfirm'])
.controller('myController', function($scope, $ngConfirm){
$scope.hey = 'Hello there!';
$ngConfirm({
title: 'What is up?',
content: 'Here goes a little content, {{hey}}',
contentUrl: 'template.html', // if contentUrl is provided, 'content' is ignored.
scope: $scope,
buttons: {
// long hand button definition
ok: {
text: "ok!",
btnClass: 'btn-primary',
keys: ['enter'], // will trigger when enter is pressed
action: function(scope){
$ngConfirm('the user clicked ok');
}
},
// short hand button definition
close: function(scope){
$ngConfirm('the user clicked close');
}
},
});
});
```## Demo and Documentation
See Detailed Docs + Example [here](http://craftpip.github.io/angular-confirm).
## Issues
Please post issues and feature request here [Github issues](https://github.com/craftpip/angular-confirm/issues)
## Version changes
(coming in 1.11.0)
* remove jquery as dependency(new in 1.1.0)
* Major performance fixes
* Fix memory leaks
* Removed ngAnimate and ngSanitize as dependencies
* added set methods to modal
* watchInterval property removed, content watch is now done with $digest
* button functions added
* theme fixes
* onScopeReady callback added(new in 1.0.1)
* Added project to bower## Copyright and license
Copyright (C) 2016 angular-confirm
Licensed under [the MIT license](LICENSE).