@Baumer wrote:
I am using the most up to date stable versions Ember/Ember Data (2.3.1)
Is it possible to get computed property values out of an Ember Object that is exposed through the DS.Snapshot Object? I do not see an easy way to get these values, and right now I am duplicating a lot of logic to extract these values.
For example, if I have an Ember Object that looks like:
var FooModel = DS.Model.extend({ firstName: DS.attr('string'), lastName: DS.attr('string'), fullName: function() { return `${this.get('firstName') ${this.get('lastName')}; }.property('firstName', 'lastName') });
Through the DS.Snapshot object that is exposed, I am able to get
firstName
andlastName
through the snapshotsattr
method, but I do not see a way to get thefullName
computed property. I have googled this and haven't had much luck. Any insight would be helpful, thanks!
Posts: 1
Participants: 1