javascript - angular-datatables - Can a column's renderWith function return value from a promise? -


is possible make call service/filter returns promise within column's renderwith() function? i'm attempting , output "[object object]".

vm.dtinstance = {};  vm.dtoptions = dtoptionsbuilder.fromfnpromise(myservice.getdata())             .withpaginationtype('full_numbers')             .withoption('rowcallback', casesdtrowcallback)             .withbootstrap()             .withoption('createdrow', createdrow)             .withoption('scrollx', true)             .withoption('scrolly', false);  vm.dtcolumns = [             dtcolumnbuilder.newcolumn(null)                 .withtitle('id')                 .renderwith(idhtml),             dtcolumnbuilder.newcolumn(null)                 .withtitle('status')                 .renderwith(statushtml), ];  function casestatushtml(data, type, full, meta) {             return $filter('mycustomfilter')(data.thestatus).then(function(response) {                 // mycustomfilter returns string                 return response;             }) } 

try ff:

function casestatushtml(data, type, full, meta) {     $filter('mycustomfilter')(data.thestatus).then(function(response) {         $(meta.settings.aodata[meta.row].ancells[meta.col]).text(response);     });     return data; } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -