我正在使用AngularJS和SPring。我需要找到一种方法来通知用户,即使用户已将应用程序浏览器窗口最小化,还是有其他更好的选择基于批处理作业来通知用户。
也许您正在寻找类似的东西Browser Desktop Notification
。
我刚刚找到此链接,也许这可以为您提供帮助。
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");
}
});
};
});
链接的工作提琴:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句