This file contains hidden or 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
So bascially, user location is gotten in the application controller. This gets saved as userLocation, and accessed via computer property on other routes controllers. It's only needed on vineyard/index and vineyard/show routes. Seems like the right away to do this... | |
Once user location is recieved and accessible via the template, it is passed to the miles-away component along with vineyardLocation (address string, Google is smart enough to handle these, even if the user inputs wrong zips, spells things wrong etc etc). | |
The component miles-away then takes these two parameters and runs the long function you see in miles-away.js. Now the way this is setup seems like really poor execution. It renders how many miles away a vineyard is, but gives me no way to sort. That should make sense just by looking at the handlebars templates. | |
Do I put this whole list in my component? I'm using ember composable helpers, so sorting should work nicely when I can get the distanceFrom at the model level?? This is the absolute m |
This file contains hidden or 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
--- | |
language: node_js | |
node_js: | |
- "6" | |
sudo: false | |
dist: trusty | |
addons: | |
chrome: stable |