1 year ago

#136356

test-img

Pushprajsinh Chudasama

Dynamically update “firebase-messaging-sw.js” in Angular 12

I need to implement the Firebase push notification on Angular 12.

I integrated everything and it worked fine, but I need a dynamic firebase config. How to achieve dynamic config?

importScripts('https://www.gstatic.com/firebasejs/4.6.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.6.1/firebase-messaging.js');


firebase.initializeApp({
  'messagingSenderId': '192*******9'
});
const messaging = firebase.messaging();

angular

firebase

firebase-cloud-messaging

service-worker

angular-service-worker

0 Answers

Your Answer

Accepted video resources