Ember-I18n declares the following dependencies:
"cldr": "^1.0",
"jquery": ">=1.7 <3",
"handlebars": "^1.0",
"ember": ">0.9.7 <2"Ember-I18n declares the following dependencies:
"cldr": "^1.0",
"jquery": ">=1.7 <3",
"handlebars": "^1.0",
"ember": ">0.9.7 <2"I just signed another year lease on my apartment, so I figured if I have another year here, I might as well try to improve my Internet service and/or price. I really dislike how my current provider, Comcast, is opposing Net Neutrality, so I looked around for altneratives. Nope, still just Comcast and AT&T. Monopolies :(
So I went to comcast.com. Ooh, neat! They have a promotion on Internet that would cut my rate way down. I signed in. "This is a business address. For business service, call us or enter another address." I clicked "enter another address," hoping they just had my address wrong. That link takes me back to ""This is a business address. For business service, call us or enter another address." So much for a usable website.
OK, fine, I'll call. After a couple minutes of playing verbal and key-based phone tree, I get a very nice customer service agent. I ask him what plans are available in my region. He looks for a minute and says, "We have a promotion to add voice, give you the same Internet servic
| import DS from "ember-data"; | |
| function ensureRoot(rootName, payload) { | |
| var result; | |
| if (payload[rootName] == null) { | |
| result = {}; | |
| result[rootName] = payload; | |
| } else { | |
| result = payload; |
Dear Chris Henn,
I loved your talk at EmberConf this year. Thanks so much for sharing that with us!
I had recently spiked on replacing our graphing library with some components and happened upon a very similar solution to what you described. What I didn't know is that there was an existing grammar for these concepts. I knew a few terms like axes and series, so those became nouns (or components) in my world. My template looks like this:
I'm having trouble with Ember.HTMLBars.makeBoundHelper. I ran ember g helper format-date, which emitted app/helpers/format-date.js (see below). Note that it uses Ember.HTMLBars.makeBoundHelper. The helper function expects a Date and a format String.
When I render the template (see below), the helper receives instead
Array of the form [ Sat Feb 28 2015 16:00:00 GMT-0800 (PST), "MMMM YYYY" ]ObjectObject of the form { morph: Morph }Object of the form { data: Object, dom: DOMHelper, helpers, Object, hooks: Object, useFragmentCache: true: view: undefined }If I change Ember.HTMLBars.makeBoundHelper to Ember.Handlebars.makeBoundHelper, the helper function receives
changePassword goes to the PasswordChanger.I'm considering refactoring a number Ember.Components that have API interactions to use one or more API service objects. I'm concerned with the layer violation: making API calls in the view layer.
changePassword(old, new) -> PromiseI'm trying to test some code that involves focus and blur handlers using event delegation. $(...).focus() doesn't work, but $(...).focus().focus() does!
The tests pass fine on PhantomJS and Safari, but fail on Chrome and Firefox. (No, I've never seen that happen before either!)
Here's a simple reproduction:
$('body').append("<div class='my-container'><input /></div>");
var $div = $('.my-container');
$div.on('focus', 'input', function(e) {I have a case in an Ember.Route where I want to start a few asynchronous fetches, each of which resolves with a complex Object, and then eventually merge the results. RSVP has some nice higher-level Promise utilities, but it doesn't have merge. So I wrote one.
If you only ever want to merge two Promises, you could do this
function mergeTwoPromises(promiseA, promiseB) {
return new Ember.RSVP.Promise(function(resolve, reject) {
Ember.RSVP.all([ promiseA, promiseB ])
.then(function([ hashA, hashB ]) {
resolve(Ember.merge(hashA, hashB));| def merge_two_sorted_lists(a, b, &comparator) | |
| comparator ||= lambda { |x,y| x <=> y } | |
| linrec( | |
| :cond => lambda { |pair| pair.first.empty? || pair.last.empty? }, | |
| :before => lambda do |pair| | |
| preceding, following = case comparator.call(pair.first.first, pair.last.first) | |
| when -1; [pair.first, pair.last] | |
| when 0; [pair.first, pair.last] | |
| when 1; [pair.last, pair.first] | |
| end |