{"id":18614809,"url":"https://github.com/andrewjbateman/angular-material-api","last_synced_at":"2026-04-29T10:34:47.229Z","repository":{"id":37953211,"uuid":"192519704","full_name":"AndrewJBateman/angular-material-api","owner":"AndrewJBateman","description":":clipboard: Angular Progressive Web App using Angular Material and Server Side Rendering (SSR) to display cryptocurrency information and achieve an excellent Lighthouse score.","archived":false,"fork":false,"pushed_at":"2023-06-06T14:28:22.000Z","size":4591,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:26.839Z","etag":null,"topics":["angular","angular16","crypto-news","cryptocurrencies","html5","pwa","scss-styles","typescript"],"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":"2019-06-18T10:38:31.000Z","updated_at":"2023-06-05T19:29:19.000Z","dependencies_parsed_at":"2024-11-07T03:40:55.307Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/angular-material-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/angular-material-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-material-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-material-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-material-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-material-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/angular-material-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-material-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","crypto-news","cryptocurrencies","html5","pwa","scss-styles","typescript"],"created_at":"2024-11-07T03:27:05.185Z","updated_at":"2026-04-29T10:34:47.211Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Material API\n\n* Angular Progressive Web App (PWA) to display crypto currency information from a REST API using Angular Material\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-material-api?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-material-api?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-material-api?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-material-api?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [Angular Material API](#angular-material-api)\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: Features](#cool-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* To generate a component with module and routing: `ng g m my-page --routing=true` \u0026\u0026 `ng g c my-page -m=my-page`\n* The Home page displays a list of crypto news.\n* The `cryptos.service.ts` files uses the RxJS operator take(1) which just takes the first value and completes. No further logic is involved. If there is no data then take(1) simply returns nothing.\n* The News Detail page displays the crypto news item the user has clicked on.\n* [New Angular image directive NgOptimizedImage](https://angular.io/guide/image-directive) used for loading News Detail page image\n* Convention for Typescript variable names: `_example` = private variable, `_crypto$` = private observable\n* Seems like you do not need the API key to get news from the [CryptoCompare API](https://min-api.cryptocompare.com/)\n\n## :camera: Screenshots\n\n![Example screenshot](./imgs/crypto.png)\n\n## :signal_strength: Technologies\n\n* [Angular v16](https://angular.io/)\n* [Angular Service Workers v16](https://angular.io/guide/service-worker-getting-started) added for Progressive Web App functionality\n* [http-server](https://www.npmjs.com/package/http-server) command line http server to test PWA\n* [RxJS v7](http://reactivex.io/) operators for async observable streams\n\n## :floppy_disk: Setup\n\n* Install dependencies using `npm i`\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 run build` to build the project with PWA. The build artifacts will be stored in the `dist/angular-material-api` directory.\n* Add `defer` to `dist/angular-material-api/browser/index.html` to make loading of styles asynchronous, e.g. `\u003clink rel=\"stylesheet\" href=\"styles.d6d9df648b6debafe22a.css\" defer\u003e`\n* `npm i -g http-server` to globally install a http server to run the PWA with service workers\n* `http-server -p 8080 -c-1 dist/angular-material-api/browser` then open either link to view on a dev server\n* `ng update` to update Angular\n\n## :computer: Code Examples\n\n* `cryptos.service.ts` gets crypto price data as an Observable from an API using the RxJS take(1) method for auto-unsubscribe\n\n```typescript\n  constructor(private _http: HttpClient, private router: Router) {\n    let headers: HttpHeaders = new HttpHeaders();\n    headers = headers.append('authorization', environment.cryptoApiKey);\n\n    this._cryptoNews$ = this._http\n      .get\u003cCryptoNewsApiResponse\u003e(this._cryptosApiUrl, { headers })\n      .pipe(\n        take(1),\n        tap((res: CryptoNewsApiResponse) =\u003e {\n          console.log('API status message: ', res.Message);\n        }),\n        map((res: CryptoNewsApiResponse) =\u003e res.Data),\n        catchError((err) =\u003e {\n          throw \"error in getting API data. Details: \" + err;\n        })\n      );\n  }\n\n  get cryptoNews$(): Observable\u003cCryptoNews[]\u003e {\n    return this._cryptoNews$;\n  }\n```\n\n## :cool: Features\n\n* Lazy-loading of all modules\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working app with 93% lighthouse score and 100% accessibility, Best Practises, SEO. PWA not working.\n* To-Do: Fix PWA. Add News detail back button\n* To-Do: Add Apple Touch Icon. Correct image sizing on Home page, add nav menu about and contact page.\n* To-Do: Add more crypto info pages.\n\n## :clap: Inspiration\n\n* [Typescript documentation](https://www.typescriptlang.org/docs/)\n* [Material Theming](https://material.io/design/material-theming/overview.html#using-material-theming)\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: '\u003cgomezbateman@yahoo.com\u003e'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-material-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fangular-material-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-material-api/lists"}