Created
October 31, 2015 14:50
-
-
Save NetguruGist/25c895fdfd5375317e4b to your computer and use it in GitHub Desktop.
runloop4.2 ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partOfNameChanged: Ember.observer("firstName", "lastName", function() { | |
Ember.run.once(this, "doSomeProcessing"); | |
}) | |
doSomeProcessing: 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