diff --git a/packages/ember-views/lib/views/view.js b/packages/ember-views/lib/views/view.js index 39b7e783b0f..7e2b95e18e1 100644 --- a/packages/ember-views/lib/views/view.js +++ b/packages/ember-views/lib/views/view.js @@ -105,9 +105,9 @@ Ember.TEMPLATES = {}; MyView = Ember.View.extend({ classNameBindings: ['propertyA', 'propertyB'], propertyA: 'from-a', - propertyB: function() { + propertyB: Ember.computed(function() { if (someLogic) { return 'from-b'; } - }.property() + }) }); ``` @@ -320,13 +320,13 @@ Ember.TEMPLATES = {}; MyTextInput = Ember.View.extend({ tagName: 'input', attributeBindings: ['disabled'], - disabled: function() { + disabled: Ember.computed(function() { if (someLogic) { return true; } else { return false; } - }.property() + }) }); ``` @@ -442,9 +442,9 @@ Ember.TEMPLATES = {}; aController = Ember.Object.create({ firstName: 'Barry', - excitedGreeting: function() { - return this.get("content.firstName") + "!!!" - }.property() + excitedGreeting: Ember.computed('content.firstName', function() { + return this.get('content.firstName') + '!!!'; + }) }); aView = AView.create({ @@ -1088,10 +1088,10 @@ var View = CoreView.extend( ```javascript export default Ember.Component.extend({ - setElementId: function() { + setElementId: Ember.on('init', function() { var index = this.get('index'); this.set('elementId', 'component-id' + index); - }.on('init') + }) }); ```