forked from dev-tim/angular-noty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.js
36 lines (33 loc) · 780 Bytes
/
demo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(function () {
'use strict';
angular.module('nottyApp', ['notyModule'])
.config(function (notyProvider) {
notyProvider.settings = {
theme: 'relax',
text: 'Custom default message',
layout: 'topCenter',
force: true,
easing: 'swing',
timeout: 5000,
animation: {
open: 'animated fadeInUp',
close: 'animated fadeOutDown',
easing: 'swing'
}
}
})
.controller('AppCtrl', function ($scope, noty) {
$scope.showNotification = function () {
noty.show('Test message','information');
};
$scope.showAlert = function () {
noty.showAlert('Alert!')
};
$scope.showError = function () {
noty.showError('Test message');
};
$scope.closeAll = function () {
noty.closeAll()
};
});
})();