Skip to content

Instantly share code, notes, and snippets.

@Abiwax
Created January 27, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abiwax/721e82851f1396702226b025cf06e939 to your computer and use it in GitHub Desktop.
Save Abiwax/721e82851f1396702226b025cf06e939 to your computer and use it in GitHub Desktop.
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