-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathindex-angular.html
More file actions
38 lines (37 loc) · 1.46 KB
/
index-angular.html
File metadata and controls
38 lines (37 loc) · 1.46 KB
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
37
38
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular Notification Demo</title>
</head>
<body ng-app="app" ng-controller="appcontroller">
<button ng-click="nofity();">angular notify</button>
<script src="bower_components/angular/angular.min.js"></script>
<script src="dist/vendor/promise-polyfill.js"></script>
<script src="dist/angular-notifyme.js"></script>
<script type="text/javascript">
//====================================
// Init Angular module and controller
//====================================
angular.module('app', ['notifyme']).
controller('appcontroller', function($scope, NotifyMe) {
$scope.nofity = function(){
var title = "I'm from Angular ?";
var body = 'This is a simple demo for the notification API Angular Service';
NotifyMe.launch(title, {
body: body,
onclick:function(){
console.log("On Click Triggered");
},
onerror:function(){
console.log("On Error Triggered");
},
onclose:function(){
console.log("On Close Triggered");
}
});
};
});
</script>
</body>
</html>