firebase-messaging-sw file where to place this file in angular web app

349 views
Skip to first unread message

Vishnu Bidarakundi

unread,
Feb 24, 2017, 11:54:25 AM2/24/17
to Firebase Google Group
 I am struck while registering service worker. I have created sample project there i have added firebase-messaging-sw.js file at root level like this at root level 
and manifest.json file later i did " grunt serve " after launching app able to register service worker and token is generated , and it is working fine .

after that I tried Implementing that feature in actual working project , I have added at root level giving 
Uncaught Error: [$http://injector:modulerr] Failed to instantiate module App due to:
Error: [$http://injector:modulerr] Failed to instantiate module lazyModel due to:
Error: [$http://injector:nomod] Module 'lazyModel' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. this Error.

and also i have added manifest.json file at root level its not loading in browser .

Now the question is for " grunt serve " project is working fine , for " grunt build " generated a dist added that that in war file below the WEB INF . why it is working for grunt build ??

dist is not not packging the file.

for my actual project the path is http://localhost:8080/XXXXXX/index.html#/core/login i am using this path "grunt build " generated dist .

for my sample project http://localhost:9000/#/ used grunt serve.

is there any npm package available firebase-messaging-sw js file ??

Regards
Vishnu B


Kato Richardson

unread,
Feb 24, 2017, 4:58:22 PM2/24/17
to Firebase Google Group
Hello Vishnu,

Looks like you posted this question on Stack Overflow. It shows respect for the community's time if you link to the duplicate, so we don't rehash material that's already been covered.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/33f01990-f4ed-4c6f-bb09-b36640ddafc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages