Using the GET
method here to retrieve the list of applied jobs. This code snippet is taken from the appliedJobsPage
.
this.getjobs.getAppliedjobList().subscribe(data => {
this.appliedjobs = data;
})
This code is part of my provider page getJobs
.
getAppliedjobList() {
let headers = new Headers();
headers.append('Content-Type','application/json');
return this.http.get('http://localhost:3000/api/appliedjobs',{headers: headers})
.map(res => res.json())
.subscribe(data => {
this.jobslist = data;
});
}
An error message is popping up stating:
Property 'subscribe' does not exist on type 'Subscription'. Did you mean 'unsubscribe'?