shivkumarganesh/Notifications
소개
NotifyMe enables you to create web notifications pretty easily - "Just Call me and Launch!!"
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNotifyMe
Introduction
NotifyMe is a simple JavaScript Library written in JavaScript and implements the Notificaiton Interface for Web. It’s still being built and some amazing features are being added to it. The best way is to use this library directly with your front end code and invoke it from multiple medium. It gives you options for the following :-
- A custom icon
- Callbacks to be executed
- Everything you can creatively do with it
Implementation
The implementation for the same are pretty easy and straight forward. Import the NotifyMe.js from the dist folder and prepare the object to be passes to it.
A typical implementation looks something like this.[Sample can be found in index.html]
(function(){
//TO build the option Object with data
var options = {
icon: 'http://i.istockimg.com/file_thumbview_approve/46749378/3/stock-illustration-46749378-cute-piglet-icon-animal-icons-series.jpg',
body: 'This is a simple demo for the notification API',
onclick:function(){
console.log("On Click Triggered");
},
onerror:function(){
console.log("On Error Triggered");
},
onclose:function(){
console.log("On Close Triggered");
}
};
//Actual Implementation of NotifyMe.js
NotifyMe.launch(title,options);
})();
Add promise-polyfill and angular-notifyme files into your html.
<script src="dist/vendor/promise-polyfill.js"></script>
<script src="dist/angular-notifyme.js"></script>
Inject notifyme dependency into your main module.
angular.module('app', ['notifyme']);
Inject NofifyMe service into your controller and launch NotifyMe in the same way,
var options = {
icon: 'http://i.istockimg.com/file_thumbview_approve/46749378/3/stock-illustration-46749378-cute-piglet-icon-animal-icons-series.jpg',
body: 'This is a simple demo for the notification API',
onclick:function(){
console.log("On Click Triggered");
},
onerror:function(){
console.log("On Error Triggered");
},
onclose:function(){
console.log("On Close Triggered");
}
};
NotifyMe.launch(title,options);
Open index-angular.html file for sample implementation.
Note: Right now any user should provide a default options for the 4 different callbacks. In the next version we would extend this object to a custom object so as to have a default object in place. This would not allow errors to occour at console. As such the functionalities are fine and working.
Version
0.0.1
Todo's
- Write Tests for the same
- Direction Integration
- Language Integration
- Methods Integration
- Integrate with Travis CI
- Fix the options to extend to default
- Propagate it through the community
- Prepare samples with WebSocket
- Integrate Alarm API with this
- Trust Issue Configuration(If the user Denies then report back to the Developer)
License
MIT
To Contact Author or Contribute mailat: [email protected] skype: gshiv.sk Please fork and give me a pull request [If interested to contribute]
관련 프로젝트 살펴보기
불러오는 중…