Naming private computed properties

When you create a computed property on an Ember Object it is publicly available but you might not want other Objects to access it. For example when creating an intermediate computed property.

To indicate that a property is private, name it with an underscore at the start.

export default Ember.Object.extend({
  _hasNoIssues: Ember.computed.and('isOnTime', 'looksGood'),
  hasIssues: Ember.computed.not('_hasNoIssues')
Naming private computed properties
Share this