angular-alert-provider
Angular Bootstrap modal window encapsulated in angular provider.
Compatibility
- Angular: >1.2.28
- Angular-bootstrap: ~0.14.3
Installation
Download plugin
bower install angular-alert-provider --save-dev
Add lib into script
Include provider into angular module dependency:
angular;
Ustage
$scope { var { console; }; var { console; }; var alert = $alertProvider; };
Result:
Example
Install external dependencies
bower installnpm install
Run grunt command in order to serve example page on http://localhost:3001 host.
grunt serve
Options
-
Provider allows to use angular bootstrap options (documentation)
-
title (required): Title of modal dialog.
-
body (required): Body of modal dialog.
-
buttons (required): Collection of buttons:
- label: - button label.
- cssClass: - css class of button.
- action: - callback triggered once clicked on button.
buttons: label: 'Yes' cssClass: 'btn btn-primary' action: actionYes label: 'No' cssClass: 'btn btn-danger' action: actionNo
- templateUrl (optional): Provider allows to change tempalate. Here you can set different template url in order to change structure of modal.
Release notes
- 0.1.0 First version.