Skip to content
Browse files

Edited the README.md to match the depreciation of computed properties…

… in the create method.
  • Loading branch information...
1 parent 2093ec2 commit 7c2151d1a3a0d3b4383b81710888f96f361cf771 @andyhmltn andyhmltn committed Feb 14, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 README.md
View
5 README.md
@@ -38,7 +38,7 @@ Bindings allow you to architect your application using the MVC (Model-View-Contr
Computed properties allow you to treat a function like a property:
``` javascript
-MyApp.president = Ember.Object.create({
+MyApp.President = Ember.Object.extend({
firstName: "Barack",
lastName: "Obama",
@@ -49,6 +49,7 @@ MyApp.president = Ember.Object.create({
}.property()
});
+MyApp.president = MyApp.President.create();
MyApp.president.get('fullName');
// "Barack Obama"
```
@@ -58,7 +59,7 @@ Treating a function like a property is useful because they can work with binding
Many computed properties have dependencies on other properties. For example, in the above example, the `fullName` property depends on `firstName` and `lastName` to determine its value. You can tell Ember.js about these dependencies like this:
``` javascript
-MyApp.president = Ember.Object.create({
+MyApp.President = Ember.Object.extend({
firstName: "Barack",
lastName: "Obama",

0 comments on commit 7c2151d

Please sign in to comment.
Something went wrong with that request. Please try again.