Last active
August 29, 2015 14:22
-
-
Save begin29/a20ec732ecf3a3655bfd to your computer and use it in GitHub Desktop.
#EmberJS From https://www.airpair.com/ember.js/posts/top-mistakes-ember-railscall controller function from View Event
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
App.ProfilePhotoView = Ember.View.extend({ | |
click: function(evt) { | |
this.get('controller').send('expandProfilePhoto'); | |
} | |
}); | |
App.UserController = Ember.ObjectController.extend({ | |
actions: { | |
expandProfilePhoto: function() { | |
// Get the expanded picture and display it | |
// We'll talk more about what to do here later | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment