Created
July 6, 2017 10:13
-
-
Save dan-ste/47c1eda47ef95508a6e8cb06a4c3f811 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
export default TutorialComponent.extend({ | |
result: null, | |
findStores: task(function * () { | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); | |
try() { | |
let coords = yield geolocation.getCoords(); | |
let result = yield store.getNearbyStores(coords); | |
this.set('result', result); | |
} catch (e) { | |
// handle error | |
} | |
}).drop(), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment