add json assets for team members and accompanying api/interface connectors

This commit is contained in:
eleanor 2018-11-12 10:25:58 -05:00
parent c73c806cf5
commit 662c075e2c
3 changed files with 41 additions and 1 deletions

View File

@ -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) {

View File

@ -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;

View 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/"
}
]