Created
July 6, 2017 09:44
-
-
Save dan-ste/9322b10952a0de5d1561c92a8313a38e 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 { task } from 'ember-concurrency'; | |
export default TutorialComponent.extend({ | |
result: null, | |
findStores: task(function * () { | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); | |
let coords = yield geolocation.getCoords(); | |
let result = yield store.getNearbyStores(coords); | |
this.set('result', result); | |
}).drop(), // ++ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment