JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.rawgit.com/sesubash/NotifyMe/master/src/vendor/promise-polyfill.js"></script>
<script src="https://cdn.rawgit.com/sesubash/NotifyMe/master/src/angular-notifyme.js"></script>
<div ng-controller="appcontroller">
<button ng-click="nofity();">angular notify</button>
</div>
CSS
button{
padding: 10px;
background: #Red;
border: none;
color: white;
font-size: 12px;
position: relative;
top: 50vh;
left: 40vw;
}
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");
}
});
};
});