Open petrovskyy opened 9 years ago
In case table is rendered later than directive initialisation ctrl.tableElement gonna be empty.
I would suggest moving table element lookup
if(elementScope.ctrl.tableSelector) { ctrl.tableElement = $document.find(elementScope.ctrl.tableSelector); }
into function exportTable() or click handler
function exportTable()
Could you create a PR without problem!
In case table is rendered later than directive initialisation ctrl.tableElement gonna be empty.
I would suggest moving table element lookup
into
function exportTable()
or click handler