Skip to content

Instantly share code, notes, and snippets.

@g-cassie
Created November 3, 2014 15:52
Show Gist options
  • Select an option

  • Save g-cassie/42f7cf9414629faf70e4 to your computer and use it in GitHub Desktop.

Select an option

Save g-cassie/42f7cf9414629faf70e4 to your computer and use it in GitHub Desktop.
//Model
number: Ember.computed(function(){
var cid = this.get('CID'),
promise;
promise = this.get('deal').then(function(deal){
var num = deal.get('contentNumbering')[cid];
return num ? num + '.' : '';
});
return DS.PromiseObject.create({promise: promise});
}).property('deal.contentNumbering'),
// Template
{{item.number}}
{{item.number.content}}
// Output
<DS.PromiseObject ...>
123 (correct output)
// Desired Output
123 (correct output)
123 (correct output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment