Skip to content

[Feature Request]: PWA support #75

Open
@geromegrignon

Description

@geromegrignon

Relevant Scope

angular application

Description

Add PWA support so users can use the application offline and install it.

Describe the solution you'd like

Use @angular/pwapackage

  • run npm install @angular/pwa firstly as it's a nx workspace
  • run npx nx g @angular/pwa:ng-add --project=angular-hub to run the schematic

Update created icons

You can use this image here as a starter
There are multiples web app to generate different icons based one it, like PWA Builder

Add update mechanism

Add some logic to reload the application on updates, for example:

router.events
      .pipe(
        filter((event) => event instanceof NavigationEnd),
        switchMap(() => this.swUpdate.versionUpdates),
        filter((evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY')
      )
      .subscribe(() => {
        document.location.reload();
      });
      ```

### Describe alternatives you've considered

_No response_

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions