https://github.com/andrewjbateman/angular-material-app
:clipboard: This app integrates Google's Material Design into an Angular app. It displays a series of coloured cards from a public API. The number of cards is limited to 10 using an rxjs filter, but there are 500 of these cards available, all with titles, numbers etc.
https://github.com/andrewjbateman/angular-material-app
angular angular-material angular16 animation-library api cards coloured-cards css3 html5 material-design rxjs7 typescript4
Last synced: 8 months ago
JSON representation
:clipboard: This app integrates Google's Material Design into an Angular app. It displays a series of coloured cards from a public API. The number of cards is limited to 10 using an rxjs filter, but there are 500 of these cards available, all with titles, numbers etc.
- Host: GitHub
- URL: https://github.com/andrewjbateman/angular-material-app
- Owner: AndrewJBateman
- License: mit
- Created: 2018-12-10T18:36:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T05:39:15.000Z (almost 2 years ago)
- Last Synced: 2024-12-27T02:45:22.923Z (10 months ago)
- Topics: angular, angular-material, angular16, animation-library, api, cards, coloured-cards, css3, html5, material-design, rxjs7, typescript4
- Language: TypeScript
- Homepage:
- Size: 2.09 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :zap: Angular Material App
* This app integrates Google's Material Design into an Angular app. It displays a series of coloured cards from a public API. The number of cards is limited to 10 using a splice function, but there are 500 of these cards available, all with titles, numbers etc.
* **Note:** to open web links in a new window use: _ctrl+click on link_


## :page_facing_up: Table of contents
* [:zap: Angular Material App](#zap-angular-material-app)
* [:page\_facing\_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal\_strength: Technologies](#signal_strength-technologies)
* [:floppy\_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status \& To-Do List](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file\_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)## :books: General info
* Gary Simon tutorial (based on Angular 4) but the app.module.ts, app.component.ts and app.component.html required changes due to changes in Angular 7/8.
* HTTP request moved to its own service file.
* Materials modules begin with 'mat' and not 'md'; md has been deprecated.
* rxjs pipe - map - filter used to limit http response to 10 items using item id - max 5000 items available which takes a while to download.
* rxjs throwError method updated
* [A jsonplaceholder API](https://jsonplaceholder.typicode.com/photos) was used to provide dummy json data for the app.## :camera: Screenshots
.
.## :signal_strength: Technologies
* [Angular v16](https://angular.io/)
* [RxJS Library v7](https://angular.io/guide/rx-library) used to handle datastreams and propagation of change using observables.
* [Angular Material v16](https://material.angular.io/).## :floppy_disk: Setup
* Install dependencies using `npm i`
* Run `ng serve` for a dev server
* Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files## :computer: Code Examples
* service function to get profile data via http request
```typescript
export class ProfileService {
constructor(private http: HttpClient) {}getProfileData(): Observable {
const profileUrl = "https://jsonplaceholder.typicode.com/photos";
return this.http.get(profileUrl).pipe(
map((data: Profile) => data),
catchError((err) => {
return throwError(
"Problem fetching profile data from API, error: ",
err
);
})
);
}
}
```## :cool: Features
* Angular Material cards used to show API data.
## :clipboard: Status & To-Do List
* Status: Working.
* To-Do: Nothing.## :clap: Inspiration
* [Gary Simon](https://www.youtube.com/c/DesignCourse) tutorial on Youtube - no longer available
## :file_folder: License
* This project is licensed under the terms of the MIT license.
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: `gomezbateman@yahoo.com`