{"id":18614796,"url":"https://github.com/andrewjbateman/angular-app-infopwa","last_synced_at":"2026-05-04T23:33:00.881Z","repository":{"id":40686064,"uuid":"156996495","full_name":"AndrewJBateman/angular-app-infopwa","owner":"AndrewJBateman","description":":clipboard: App to display information from an API. A service-worker is used to make this a Progressive Web Application (PWA).","archived":false,"fork":false,"pushed_at":"2023-07-09T20:25:08.000Z","size":2121,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:27.247Z","etag":null,"topics":["angular","angular16","css","gary-simon-tutorial","httpclient","pwa","pwa-apps","rxjs","service-worker","typescript4"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-10T15:57:40.000Z","updated_at":"2023-07-18T09:09:13.000Z","dependencies_parsed_at":"2024-11-07T03:40:54.864Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/angular-app-infopwa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/angular-app-infopwa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-app-infopwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-app-infopwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-app-infopwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-app-infopwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/angular-app-infopwa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-app-infopwa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262049079,"owners_count":23250676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular16","css","gary-simon-tutorial","httpclient","pwa","pwa-apps","rxjs","service-worker","typescript4"],"created_at":"2024-11-07T03:27:01.740Z","updated_at":"2026-05-04T23:32:55.864Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Angular App Info PWA\n\n* App to display information from an API with a fully working service worker.\n* A service-worker is used to make this a Progressive Web Application (PWA).\n* Partly tutorial code from [Gary Simon at DesignCourse](https://www.youtube.com/channel/UCVyRiMvfUNMA1UPlDPzG5Ow) see [:clap: Inspiration](#clap-inspiration) below, but with major modifications, including to maximise Lighthouse score.\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/angular-app-infopwa?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-app-infopwa?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-app-infopwa?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-app-infopwa?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Angular App Info PWA](#zap-angular-app-info-pwa)\n  * [:page\\_facing\\_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal\\_strength: Technologies](#signal_strength-technologies)\n  * [:floppy\\_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: PWA/Angular Features](#cool-pwaangular-features)\n  * [:clipboard: Status \\\u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file\\_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Angular httpClient used to get API data. RXJS observables are not used this time; just a simple HTTP fetch of data.\n* Progressive Web App: runs in the browser and manages data caching so API info is still displayed in the event of a loss of network. All PWAs require HTTPS (hypertext transport secure). They require a TLS (SSL - Secure Sockets Layer) or Digital certificate.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/home.png).\n\n## :signal_strength: Technologies\n\n* [Angular v16](https://angular.io/)\n* [RxJS Library v7](https://angular.io/guide/rx-library) used to [subscribe](http://reactivex.io/documentation/operators/subscribe.html) to the API data [observable](http://reactivex.io/documentation/observable.html).\n* [Angular service worker v16](https://angular.io/guide/service-worker-intro)\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies\n* `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n* `npm i -g http-server` to install http-server globally.\n\n* `npm run build` to create the build file.\n* `cd dist\\angular-app-infoPwa` to change directory.\n* `http-server -o` and navigate to `http://192.168.0.104:8080` to see API working with the service worker in operation.\n* You will see something like:\n\n  `_Starting up http-server, serving ./\n  Available on:\n  http://192.168.0.104:8080\n  http://127.0.0.1:8080\n  Hit CTRL-C to stop the server_`\n\n## :computer: Code Examples\n\n* `data.service.ts` using httpClient service with a `getInfo()` function to get user details from the API.\n\n```typescript\n\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DataService {\n\n  constructor(private http: HttpClient) { }\n\n  getInfo() {\n    return this.http.get\u003cInfo\u003e(\"https://api.chucknorris.io/jokes/random\");\n  }\n}\n\n```\n\n## :cool: PWA/Angular Features\n\n* `Manifest.json` file\n* [ngsw-config.json](https://angular.io/guide/service-worker-config) file: specifies which files and data URLs the service worker should cache and how it should update the cached files and data. Also has a URL for fonts to use when offline. Other settings, including dataGroups \"freshness\" strategy option.\n* [SwUpdate](https://angular.io/api/service-worker/SwUpdate) module used to subscribe to update notifications from the Service Worker, trigger update checks, and forcibly activate updates.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Reduce unused Javascript\n\n## :clap: Inspiration\n\n* [Coursetro tutorial: Build your First Angular PWA from Scratch (Angular 6 PWA Tutorial)](https://www.youtube.com/watch?v=othhfZ0mGjU)\n* [Angular Documentation: service worker introduction](https://angular.io/guide/service-worker-intro)\n* [Ensure text remains visible during webfont load](https://www.infyways.com/fix-ensure-text-remains-visible-during-webfont-load/)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: `gomezbateman@yahoo.com`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-app-infopwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fangular-app-infopwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-app-infopwa/lists"}