Awesome Alerts for Ionic 1.x
-
Ionic View
- You can download on Ionic View using the appId:
7f2e70fa
- You can download on Ionic View using the appId:
-
Clone repository
- Clone this repo and in
/demo
folder, then runionic serve
:
- Clone this repo and in
`bower install awlert`
<link rel="stylesheet" href="lib/awlert/dist/css/awlert.css">
<script src="lib/awlert/dist/js/awlert.min.js"></script>
angular.module('myApp', ['ionic', 'awlert'])
You will use that service for create alerts in your controller.
awlert
has 3 methods with the same params (message, duration).
Ps. If you use duration = -1, the awlert will not leave.
Method | Color |
---|---|
error | assertive |
neutral | positive |
success | balanced |
You can handle with click event, you can see in this example.
awlert.neutral('Awesome neutral message for your user', 1000);
awlert.error('Awesome error message for your user', 2000);
awlert.success('Awesome success message for your user', 1000);
var neutralAwlert = awlert.neutral('User need click to remove it', -1);
neutralAwlert.$on('awlert:click', function(evt, aw){
//Do awesome stuffs
//Then, for close use:
aw.remove();
// or
// neutralAwlert.remove();
});
v1.0.1
- Add support to message with
for breakline
If you have some problem or want to suggest more features, please, create an issue for report. You would like to help us? fork it and send a pull request!!!
If you want contact me: