I'm writing an Ember App with jQuery Datatables.
I want to send the action from the controller to refresh the table, here is my code, I've used Ember Component Inbound Actions. Here is my Code:
import Ember from 'ember';
import InboundActions from 'ember-component-inbound-actions/inbound-actions';
export default Ember.Component.extend(InboundActions,{
init()
{
this._super(...arguments);
},
didInsertElement()
{
var table = this.$('#example').DataTable
({
var _this=this;
}),
actions:
{
check:function()
{
this.table.ajax.reload( null, false );
}
},
});
The result is:
Uncaught TypeError: Cannot read property 'ajax' of undefined
How to properly use this action to reload the datatables?
Greetings, Rafał
Aucun commentaire:
Enregistrer un commentaire