Skip to content

Clemo97/SIL-Frontend-Engineer-Assessment-Angular

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