attr (keyName) Object
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
Please login to continue.