Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OnInit
ngOnInit() {
if (this.jobset.jobs.length < 1) {
this.apiProvider.getCareerResults('', 'Halifax, NS')
.subscribe((jobs) => {
this.jobset.jobs = jobs;
this.jobs = this.jobset.jobs;
},
(error) => {
this.error_message = <string>error;
});
}
if (this.jobset.userLocationInfo === null || this.jobset.userLocationInfo === undefined) {
this.getUserLocation().then((location) => {
this.jobset.userLocationInfo = location;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment