begin29
6/4/2015 - 7:46 AM

#EmberJS From https://www.airpair.com/ember.js/posts/top-mistakes-ember-railscall controller function from View Event

#EmberJS From https://www.airpair.com/ember.js/posts/top-mistakes-ember-railscall controller function from View Event

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
    }
  }
});