1

1) when my internet connection is on, I click on add to home screen in chrome browser. after installation, I open the app, the app is not properly working like I show a urlbar as chrome browser. its like a browser.

2)when my internet connection is off, I click on add to home screen in chrome browser. after installation, App will be working perfectly

(angular-cli version 6.0.8,Pwa version 0.6.8)

Here I add my code https://gitlab.com/yudiz_pooja/Contact-Book

Pooja Patel
  • 89
  • 3
  • 9
  • Show us some screenshots. – Becario Senior Jul 31 '18 at 06:48
  • On Android device. Online A2HS - Installs WebApk // Offline A2HS - Installs shortcut to the web page url (NOT WebApk). You need to be online to install properly. – Mathias Jul 31 '18 at 15:46
  • Unless you have a very unusuall use case, most of your users will probably be online when they click on the install, right? – Mathias Jul 31 '18 at 15:48
  • @Mathias when I click add to home screen the app will work as it works in the browser not work like an application even I just create new project(ng new project name) and add PWA( ng add @angular/pwa@0.6.8) then also not working – Pooja Patel Aug 01 '18 at 06:10
  • when I goes offline & then add to home screen then PWaq app working as exprcted. – Pooja Patel Aug 01 '18 at 06:22
  • More details please. W – Mathias Aug 01 '18 at 10:38
  • What mobile device and what browser – Mathias Aug 01 '18 at 10:39
  • Do you have a URL you can share I can test? – Mathias Aug 01 '18 at 10:40
  • @Mathias sorry I don't have url to share with you because I just started a new project @ then add pwa – Pooja Patel Aug 01 '18 at 14:18
  • First npm install @angular/cli@6.0.8 then create new project by ng new projectname. after that I add ng add @angular/pwa@0.6.8 it does not have any error but I face that issue.can you please help me to solve it? – Pooja Patel Aug 01 '18 at 14:22
  • So the problem is this?: Add To Home Screen does not work when offline – Mathias Aug 01 '18 at 14:24
  • @Mathias Add to home screen does not work when online. the problem is there. – Pooja Patel Aug 02 '18 at 04:46
  • Once you give details on exactly what you are doing in what devices and browsers, then we may be able to help. What steps have you followed to create a PWA where you expect A2HS? – Mathias Aug 02 '18 at 05:15
  • @Mathias here I add my gitlab link of my demo application. in which I have create a simple contact app & add PWA via ng add @angular/pwa@0.6.8 .you can check it in the mobile device also. I use chrome browser for testing – Pooja Patel Aug 02 '18 at 08:46
  • @Mathias can you suggest me any version of Angular-cli & @angular/PWA version in which my application Works perfectly – Pooja Patel Aug 03 '18 at 04:49
  • Your application @ Gitlab is not ready to be tested as a PWA. You have a localhost hardcode there, so I cannot do a production build and make work on an HTTPS server. – Mathias Aug 05 '18 at 21:17
  • Here is my base PWA. Do a production build and deploy the contents of the /dist folder to a HTTPS server (NOT local). You will see that it passes the lighthouse PWA audit and that you are prompted to A2HS for Chrome-Desktop or Android (Chrome or Edge). https://github.com/ng-chicago/AngularBasePWA – Mathias Aug 05 '18 at 21:21
  • Here is my running A2HS tester. You will see it passes the PWA audit ("User can be prompted to install the web app"). https://a2hs.glitch.me/ – Mathias Aug 05 '18 at 21:26
  • @Mathias can you tell me when I was Worng in my code which I have shared here gitlab.com/yudiz_pooja/Contact-Book – Pooja Patel Aug 08 '18 at 05:42
  • No, sorry. Your application @ Gitlab is not ready to be tested as a PWA. You have a localhost hardcode in there. I tried to build and deploy to a HTTPS server, But there are errors because of those hardcodes, so I can not test your code. – Mathias Aug 08 '18 at 10:45

0 Answers0