Last active
July 12, 2016 20:05
-
-
Save allthesignals/90ccd6033a6531c52adb110ab3f6b272 to your computer and use it in GitHub Desktop.
Ember Challenge Ranges
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
// This component is designed to take any range, | |
// an area of variation between upper and lower | |
// limits on a particular scale, and distill into | |
// min/max variables | |
// This component needs to take a string | |
// that can be parsed into an array | |
// such as "[1,20]" and bind/convert | |
// respective min/max values | |
// input values | |
from: function() { | |
}.property('range'), | |
to: function() { | |
}.property('range'), | |
_resetProperty: function() { | |
}.observes('from', 'to'), | |
// helpers | |
_toArray: function(full_range) { | |
return JSON.parse(full_range); | |
}, | |
_toString: function(from,to) { | |
return '[' + from + ',' + to + ']'; | |
} | |
}); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
queryParams: ['range'], | |
appName: 'MAPC Ember Challenge', | |
range: '[1,20]' | |
}); |
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
{ | |
"version": "0.10.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.6.0", | |
"ember-data": "2.6.1", | |
"ember-template-compiler": "2.6.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment