Call action from parent component in Ember 2.x


#1

Hello,

I am trying to call an action from a parent component in my route view. Look at Ember Twiddle Example

How to call animate() from my component ? What am I doing wrong ?


#2

The action you call in your yield block is actually an action of your route. If you do this in your route, it will actually give an alert box saying “wuhu” :slight_smile:

routes/my-route.js:

import Ember from 'ember';

export default Ember.Route.extend({
  actions: {
    doIt() {
      alert("wuhu");
    }
  }
});