https://github.com/nikku/ng-simple-dialog
A simple dialog component for AngularJS
https://github.com/nikku/ng-simple-dialog
Last synced: 4 months ago
JSON representation
A simple dialog component for AngularJS
- Host: GitHub
- URL: https://github.com/nikku/ng-simple-dialog
- Owner: nikku
- Created: 2015-03-22T10:10:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-22T19:39:50.000Z (over 11 years ago)
- Last Synced: 2025-09-25T14:01:51.930Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ng-simple-dialog
A simple, yet powerful dialog utility for [AngularJS](https://angularjs.org). Based on [simple-dialog](https://github.com/nikku/simple-dialog).
## Usage
Include the module into your application:
```javascript
var myModule = angular.module('myModule', [
require('ng-simple-dialog')
]);
```
Create dialogs anywhere, i.e. in controllers:
```javascript
var dialogTemplate =
'{{ a }} + {{ b }}
' +
'CALCULATE';
function MyController($scope, ngSimpleDialog) {
var data = {
a: 'A',
b: 'B'
};
this.openDialog = function() {
var dialog = ngSimpleDialog({
template: dialogTemplate,
scope: data
});
dialog.open(function(resultValue) {
data.resultValue = resultValue;
});
};
}
```
## License
MIT