flauc / ng-push

An Angular wrapper around the Notifications API
MIT License
59 stars 12 forks source link

requestPermission to be a promise #18

Open SunilRumbaLama opened 6 years ago

SunilRumbaLama commented 6 years ago

Can ng-push have requestPersmission to resolve into granted or denied. That would allow us to give certain information on what they will be lacking if denied.

For example:

this._push.requestPersmission.then((res)=>{
if(res=='granted')
     console.log('welcome')
})