Skip to content

Centroida/angular-pwa

Repository files navigation

Angular 2 PWA

This application is built with Angular 4 and Angular material


What's included

  • Faster load speeds and offline support using a service worker.
  • Caching server-side data using a service worker.
  • Responsive UI using Flex-Layout that can be used to your mobile home screen to have a native feel.
  • Web App Manifest that allows you to add to your phone's home screen.
  • Lighthouse score of 100/100.

Service worker packages

  • sw-precache is used to serve local static resources cache first.
  • sw-toolbox is used to handle requests using the networkFirst strategy. If a request fails, the app will fulfill the request from the cache. This means previously loaded pages will now work offline.

Contributors


NAME: NodeJS TypeScript Angular CLI Angular Angular Material
VERSION: 7.8 2.2 1.x 4.0 2.0.0-beta2

Initial Setup

  1. Download and install the appropriate version (see above) of NodeJS from: https://nodejs.org/en/download/releases/

  2. Install TypeScript, Typings and Angular CLI:

    npm install -g typescript
    npm install -g typings
    npm install -g @angular/cli@latest

Coding Guidelines

Development Server

Run ng serve for a dev server. Navigate to http://localhost:4200/.

NOTE: The app will automatically reload if you change any of the source files.

Code Scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class/module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running Unit Tests

Run ng test to execute the unit tests via Karma.

Further Help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

About

A progressive webapp with Angular with 100% Lighthouse score

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published