I have configured firebase cloud messaging api with my angularjs app.But as shown in Firebase Documentation.For Receiving message firebase-messaging-sw.js needs to be created and scripts to be imported. But on importing scripts in firebase-messaging-sw.js,
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');
how to import these scripts into firebase-messaging-sw.js because these are imported in index.html file.
Error: importScripts is not defined. Please tell how to import such file and this solution works only for chrome or for all browsers.