angular2-notifications icon indicating copy to clipboard operation
angular2-notifications copied to clipboard

Permission error

Open SlimenTN opened this issue 7 years ago • 1 comments

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 ?

SlimenTN avatar Mar 08 '17 10:03 SlimenTN

Any updates on this. Apparantly i am having the same problem. Request permission doesn't call for slider permission popup

SunilRumbaLama avatar May 17 '18 04:05 SunilRumbaLama