Skip to content

Instantly share code, notes, and snippets.

@NetguruGist
Created October 31, 2015 14:50
Show Gist options
  • Save NetguruGist/0ba595000e15e2537c9c to your computer and use it in GitHub Desktop.
Save NetguruGist/0ba595000e15e2537c9c to your computer and use it in GitHub Desktop.
runloop4.1 ruby
partOfNameChanged: Ember.observer("firstName", "lastName", function() {
console.log("[Observer]: Executing...");
})
fullName: Ember.computed("firstName", "lastName", function() {
console.log("[Computed property]: Executing...");
return (this.get("firstName") + " " + this.get("lastName"));
})
toggleName: function() {
this.set("firstName", "Foo");
this.set("lastName", "Bar");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment