changes: api integration,
components, styles, fontawesome icons added
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ResumeService } from './cv.service';
|
||||
|
||||
describe('ResumeService', () => {
|
||||
let service: ResumeService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ResumeService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ICv } from '../models/cv.model';
|
||||
import { Observable, Subject, of } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CvService {
|
||||
public resume!: ICv;
|
||||
public baseSubject = new Subject();
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
getCv(candidateId: number): Observable<ICv> {
|
||||
if(this.resume != null){
|
||||
return of(this.resume);
|
||||
}
|
||||
return this.http.get<ICv>(`/api/cv/${candidateId}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user