Skip to content

Instantly share code, notes, and snippets.

@kalyco
Created June 9, 2015 16:05
Show Gist options
  • Save kalyco/0caad07d4af48c60b524 to your computer and use it in GitHub Desktop.
Save kalyco/0caad07d4af48c60b524 to your computer and use it in GitHub Desktop.
View main function: 1. Creating reusable components. 2. Setting up logic to handle events
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
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment