Created
January 27, 2018 18:16
-
-
Save Abiwax/721e82851f1396702226b025cf06e939 to your computer and use it in GitHub Desktop.
OnInit
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
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