Created
July 18, 2013 14:07
-
-
Save teddyzeenny/6029603 to your computer and use it in GitHub Desktop.
Ember.run.once
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
JP.DashboardIndexView = Ember.View.extend({ | |
didInsertElement: function() { | |
this.usersChanged(); | |
}, | |
usersChanged: function() { | |
if (!this.$()) { return; } // View not in DOM | |
Ember.run.once(this, 'logUsers'); | |
}.observes('controller.users.@each'), | |
logUsers: function() { | |
console.log(this.get('controller.users')); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment