working #8
@@ -1,13 +1,4 @@
|
||||
<div class="tile-frame" *ngFor="let cur of ResumePage">
|
||||
<div class="tile">
|
||||
<h1>{{ cur.name }}</h1>
|
||||
<h1>{{ cur.field }}</h1>
|
||||
<h1>{{ cur.email }}</h1>
|
||||
<h1>{{ cur.phoneNumber }}</h1>
|
||||
<h1>{{ cur.city }}</h1>
|
||||
<h1>{{ cur.stateOrRegion }}</h1>
|
||||
<h1>{{ cur.country }}</h1>
|
||||
<h1>{{ cur.postalCode }}</h1>
|
||||
<h1>Active: {{ cur.isActive }}</h1>
|
||||
</div>
|
||||
<!-- My Resumes -->
|
||||
<div *ngIf="auth.isLoggedIn" class="jobs-frame">
|
||||
|
||||
</div>
|
||||
@@ -1,24 +1,33 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Resume } from 'app/models/Resume';
|
||||
import { Authentication } from 'app/services/Authentication';
|
||||
|
||||
@Component({
|
||||
selector: 'main-resumes',
|
||||
templateUrl: './resumes.component.html',
|
||||
styleUrls: [ './resumes.component.css' ],
|
||||
imports: [ FormsModule, CommonModule ]
|
||||
imports: [ FormsModule, CommonModule, RouterModule ]
|
||||
})
|
||||
export class ResumesComponent {
|
||||
|
||||
public ResumePage: Resume[] = [];
|
||||
|
||||
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title ) {
|
||||
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) {
|
||||
this.title.setTitle("Resumes | BoredCareers");
|
||||
|
||||
this.http.get<Resume[]>("api/resume").subscribe({
|
||||
next: data => {
|
||||
this.ResumePage = data;
|
||||
},
|
||||
error: err => {
|
||||
console.log("Error fetching resumes: " + err.error);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user