mardi 15 novembre 2016

Ember.js in Component send Action with data to another Component

Component action triggers perfectly.

import Ember from 'ember';

export default Ember.Component.extend({
    actions: {
      searchField: function() {
        console.log('searchField');
        this.sendAction('searchField');
      }
    }
});

Route does not get triggered.

import Ember from 'ember';

export default Ember.Route.extend({
    actions: {
      searchField: function() {
        console.log('ROUTE');
      }
    }
});

Handlebars



I have spent so much time with this I am starting to lose interest with Ember.js, as I have also tried according to the documentation, but I get the same result. http://ift.tt/1TPXSZd

Any help will be helpful.

Thanks;




Aucun commentaire:

Enregistrer un commentaire