Skip to content

Commit

Permalink
Merge pull request #11285 from jbrown/patch-6
Browse files Browse the repository at this point in the history
[DOC] Favor not using prototype extensions.
  • Loading branch information
rwjblue committed May 29, 2015
2 parents cb5b850 + ea8e075 commit 1b5adaa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/ember-views/lib/views/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
});
```
Expand Down Expand Up @@ -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()
})
});
```
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -1087,10 +1087,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')
})
});
```
Expand Down

0 comments on commit 1b5adaa

Please sign in to comment.