mirror of
https://github.com/sartography/sartography-website.git
synced 2025-02-20 12:29:27 +00:00
add json assets for team members and accompanying api/interface connectors
This commit is contained in:
parent
c73c806cf5
commit
662c075e2c
@ -2,7 +2,7 @@ import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { CaseStudy } from './interfaces';
|
||||
import { CaseStudy, TeamMember } from './interfaces';
|
||||
|
||||
@Injectable()
|
||||
export class ApiService {
|
||||
@ -16,6 +16,11 @@ export class ApiService {
|
||||
.pipe((catchError(this.handleError)));
|
||||
}
|
||||
|
||||
public getTeamMembers(): Observable<TeamMember[]> {
|
||||
return this.httpClient.get<TeamMember[]>('./assets/json/team-members.json')
|
||||
.pipe((catchError(this.handleError)));
|
||||
}
|
||||
|
||||
private handleError(error: HttpErrorResponse) {
|
||||
let message = 'Something bad happened; please try again later.';
|
||||
if (error.error instanceof ErrorEvent) {
|
||||
|
@ -1,3 +1,12 @@
|
||||
export interface TeamMember {
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
imageLink: string;
|
||||
gitHubLink: string;
|
||||
linkedInLink: string;
|
||||
}
|
||||
|
||||
export interface CaseStudy {
|
||||
projectName: string;
|
||||
tagLine: string;
|
||||
|
26
src/assets/json/team-members.json
Normal file
26
src/assets/json/team-members.json
Normal file
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"name": "Dan Funk",
|
||||
"title": "Owner, Lead Developer",
|
||||
"description": "I am a successful, battle proven, software engineer with a gift for conveying complex technical information.",
|
||||
"imageLink": "../../assets/images/staunton_old_map.jpg",
|
||||
"gitHubLink": "https://github.com/danfunk",
|
||||
"linkedInLink": "https://www.linkedin.com/in/funkdan/"
|
||||
},
|
||||
{
|
||||
"name": "Aaron Louie",
|
||||
"title": "Senior Developer",
|
||||
"description": "I am a successful, battle proven, software engineer with a gift for conveying complex technical information.",
|
||||
"imageLink": "../../assets/images/compass.jpg",
|
||||
"gitHubLink": "https://github.com/ajlouie",
|
||||
"linkedInLink": "https://www.linkedin.com/in/aaronjlouie/"
|
||||
},
|
||||
{
|
||||
"name": "Eleanor Graham",
|
||||
"title": "Developer",
|
||||
"description": "I am a successful, battle proven, software engineer with a gift for conveying complex technical information.",
|
||||
"imageLink": "../../assets/images/astro_clock.jpg",
|
||||
"gitHubLink": "https://github.com/eleanorgraham",
|
||||
"linkedInLink": "https://www.linkedin.com/in/eleanor-graham-9358115a/"
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user