angular2-notifications
angular2-notifications copied to clipboard
Permission error
I get this error in the console:
The user hasn't granted you permission to send push notifications
Although I did called this._notificationServie.requestPermission();
This is my AppComponent class:
import { Component } from '@angular/core';
import {PushNotificationsService} from 'angular2-notifications';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [PushNotificationsService]
})
export class AppComponent {
constructor(private _notificationServie: PushNotificationsService){
this.push();
}
push(){
console.log('pushing notif...');
this._notificationServie.requestPermission();
this._notificationServie
.create('Test', {body: 'Something'})
.subscribe(
res => console.log(res),
err => console.log(err)
);
}
}
how can I resolve this ?
Any updates on this. Apparantly i am having the same problem. Request permission doesn't call for slider permission popup