Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to convert a webapp coded using angular 1 to PWA(Progressive Web App)?

I have a webapp devoloped using angular 1. I have to convert it to progressive web app is this possible, I had looked into many tutorials in youtube but all of them uses angular 2 and above. Does angular 1 supports this PWA features? Please help...

like image 526
Antony Joslin Avatar asked Oct 19 '17 07:10

Antony Joslin


2 Answers

There's nothing framework-specific about PWAs - your site just has to meet a certain set of criteria:

  • Everything is served over HTTPS
  • The design must be responsive
  • Your app must be available offline (i.e. it needs a Service Worker)
  • You need to provide a manifest file containing metadata about your application
  • Your app must work in all modern browsers
  • Page transitions shouldn't block the app (i.e. you need to show loading screens/spinners if things are taking a while to load)
  • Each page in the app needs a unique URL

All of that is achievable with Angular 1 - it'll probably be easier with a modern framework, but there's nothing stopping you sticking with what you've got, for now at least.

Addy Osmani (who I believe works at Google and is pretty heavily involved with the PWA spec) has a good example of an Angular 1 PWA on his GitHub.

like image 98
Joe Clay Avatar answered Oct 05 '22 02:10

Joe Clay


My code was successful, I had added serviceworker.js and manifest, I forgot to clear the caches in my mobile. That was the problem and not with the code. Now its working fine. Clear the caches in test devices and it to homescreen once again and it will work.

like image 39
Antony Joslin Avatar answered Oct 05 '22 03:10

Antony Joslin