-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-resumes.component.ts
57 lines (50 loc) · 1.25 KB
/
user-resumes.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Created by ASUS on 10/14/2017.
*/
import {Component, OnInit} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {AuthService} from "../auth/auth.service";
import {FormBuilder, FormGroup} from "@angular/forms";
import {CVService} from "../services/cvservice.service";
import {Router} from "@angular/router";
@Component({
moduleId: module.id,
templateUrl: './user-resumes.component.html',
styles: [`body {
background-color: rgba(255, 251, 15, 0.34);
}
.vertical-offset-100 {
padding-top: 100px;
}`]
})
export class UserResumesComponent implements OnInit {
myResumes = null;
constructor(private http: HttpClient, private cvService: CVService, private router: Router) {
}
ngOnInit() {
this.getUserResumes();
}
getUserResumes() {
this.cvService.getUserResumes().subscribe(
data => {
this.myResumes = data;
console.log(this.myResumes);
},
err => console.log(err)
);
}
logOut() {
localStorage.removeItem('token');
this.router.navigateByUrl('/login');
}
createCV() {
this.cvService.createResume().subscribe(
data => {
console.log(data);
this.getUserResumes();
},
error => {
console.log(error);
});
}
}