Created
October 27, 2019 13:42
-
-
Save iamburakcoskun/94f839df951d755d9fba6ed3e5432c02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from "@angular/core"; | |
import { JobService } from "../_services/Job.service"; | |
import { Job } from "src/models/Job"; | |
import { AlertifyService } from "../_services/alertify.service"; | |
@Component({ | |
selector: "app-jobs", | |
templateUrl: "./jobs.component.html", | |
styleUrls: ["./jobs.component.css"], | |
providers: [JobService] | |
}) | |
export class JobsComponent implements OnInit { | |
listTitle = "Job List"; | |
jobs: Job[]; | |
job: Job; | |
constructor( | |
private jobService: JobService, | |
private alertify: AlertifyService | |
) {} | |
ngOnInit() { | |
this.jobService.getjobs().subscribe(data => { | |
this.jobs = data; | |
}); | |
} | |
apply(job) { | |
this.alertify.success("Successfully applied for " + job.title); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment