Skip to content

Clemo97/SIL-Frontend-Engineer-Assessment-Angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

51aa935 Β· Feb 17, 2024

History

25 Commits
Feb 9, 2024
Feb 9, 2024
Jan 31, 2024
Feb 11, 2024
Jan 31, 2024
Jan 31, 2024
Feb 17, 2024
Jan 31, 2024
Feb 6, 2024
Feb 9, 2024
Feb 17, 2024
Feb 9, 2024
Feb 6, 2024
Feb 9, 2024
Feb 9, 2024
Jan 31, 2024

Repository files navigation

⚑ Angular API User Albums

The app is deployed on (https://sil-hosting.web.app/)

*** Note: to open web links in a new window use: ctrl+click on link**

πŸ“„ Table of contents

πŸ“š General info

  • Angular routing module allows user to navigate between Users and Posts pages.
  • Angular httpClient used to get API data.
  • Sidebar with Google Material icons and links to pages.
  • Tutorial code - see πŸ‘ Inspiration below

πŸ“· Screenshots

Example screenshot.

πŸ“Ά Technologies

πŸ’Ύ Setup

  • Run npm install -legacy-peer-deps to install dependencies.
  • 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.
  • npm run build to create build folder then copy index.html to 404.html
  • Github will deploy the docs folder automatically on commit

πŸ’» Code Examples

  • data.service.ts using httpClient service with functions to get users, userIds and albums.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class DataService {

  constructor(private http: HttpClient) { }

  getUsers() {
    return this.http.get('https://jsonplaceholder.typicode.com/users')
  }

  getUser(userId) {
    return this.http.get('https://jsonplaceholder.typicode.com/users/'+userId)
  }

  getAlbums() {
    return this.http.get('https://jsonplaceholder.typicode.com/albums')
  }
}

πŸ†’ Features

  • Angular httpClient used to get data from an external API.
  • Material icons used.
  • Updated to latest Angular version with all dependency conflicts resolved.

πŸ“‹ Status & To-Do List

  • Status: Working.
  • To-Do:

πŸ“ License

  • Open Software License 3.0

βœ‰οΈ Contact