|
1 | 1 | ### 
|
2 | 2 | *alerts, confirms and dialogs in* ***one.***
|
3 | 3 |
|
4 |
| -# First release. |
| 4 | +v1.0.0 |
| 5 | + |
| 6 | +Angular-confirm targets to make it really easy to use confirm dialogs with angular. |
| 7 | +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. |
| 8 | + |
| 9 | +A re-write of the jquery-confirm v3 plugin with all features. |
| 10 | + |
| 11 | +* Define multiple buttons |
| 12 | +* Trigger buttons on key up events |
| 13 | +* Beautiful themes and animations |
| 14 | +* All modal properties are two-way binded. |
| 15 | +* Do things the angular way |
| 16 | + |
| 17 | +View detailed features here [Documentation & Examples](http://craftpip.github.io/angular-confirm) |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +Download the latest release [here](https://github.com/craftpip/jquery-confirm/archive/master.zip) and use the files within the `dist` directory |
| 22 | + |
| 23 | +* bower, npm are coming soon. |
| 24 | + |
| 25 | +##Basic usage |
| 26 | + |
| 27 | +The snippet below shows the most commonly used properties, there are more to find in the docs. |
| 28 | +```js |
| 29 | +angular.module('myApp', ['cp.ngConfirm']) |
| 30 | +.controller('myController', function($scope, $ngConfirm){ |
| 31 | + $scope.hey = 'Hello there!'; |
| 32 | + $ngConfirm({ |
| 33 | + title: 'What is up?', |
| 34 | + content: 'Here goes a little content, <strong>{{hey}}</strong>', |
| 35 | + contentUrl: 'template.html', // if contentUrl is provided, 'content' is ignored. |
| 36 | + scope: $scope, |
| 37 | + buttons: { |
| 38 | + ok: { |
| 39 | + text: "ok!", |
| 40 | + btnClass: 'btn-primary', |
| 41 | + keys: ['enter'], // will trigger when enter is pressed |
| 42 | + action: function($scope){ |
| 43 | + console.log('the user clicked ok'); |
| 44 | + } |
| 45 | + }, |
| 46 | + close: function($scope){ |
| 47 | + console.log('the user clicked close'); |
| 48 | + } |
| 49 | + }, |
| 50 | + }); |
| 51 | +}); |
| 52 | +``` |
| 53 | + |
| 54 | +## Demo and Documentation |
| 55 | + |
| 56 | +See Detailed Docs + Example [here](http://craftpip.github.io/angular-confirm). |
| 57 | + |
| 58 | +## Issues |
| 59 | + |
| 60 | +Please post issues and feature request here [Github issues](https://github.com/craftpip/angular-confirm/issues) |
| 61 | + |
| 62 | +## Copyright and license |
| 63 | + |
| 64 | +Copyright (C) 2016 angular-confirm |
| 65 | + |
| 66 | +Licensed under [the MIT license](LICENSE). |
| 67 | + |
0 commit comments