DS.Snapshot#attr()

attr (keyName) Object

Defined in addon/-private/system/snapshot.js:94

Returns the value of an attribute.

Example

// store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });
postSnapshot.attr('author'); // => 'Tomster'
postSnapshot.attr('title'); // => 'Ember.js rocks'

Note: Values are loaded eagerly and cached when the snapshot is created.

Parameters:

keyName String

Returns:

Object
The attribute value or undefined
doc_EmberJs
2016-11-30 16:50:41
Comments
Leave a Comment

Please login to continue.