I want to put a button with an ng click parameter in a button but I'm 
generating it with the FnRender method o jquery datatable


*{"fnRender": function(oObj){*
*       //console.log(oObj.aData);*
*       var i=0,*
*       link = 'reports/bol.php?bol='+oObj.aData.srBol+'',*
*       bolBtn = '<a href="#" onClick= window.open("'+link+'") 
data-id="'+oObj.aData.srBol+'" class="btn btn-xs blue btn-bol"><i class="fa 
fa-print"></i> BoL</a>',*
*       filediv = '<div class="btn-group" ><button class="btn default 
btn-xs dropdown-toggle" type="button" data-toggle="dropdown">Files..<i 
class="fa fa-angle-down"></i></button><ul class="dropdown-menu pull-right" 
role="menu"><li><span data-id="'+oObj.aData.srBol+'" class="btn btn-xs 
green btn-addfile fileinput-button"><i class="fa fa-plus"></i><span> 
File</span><input type="file" id="fileselect" 
data-id="'+oObj.aData.srBol+'" class="input-addfile" name="files[]" 
multiple="multiple"></span>',*
*       file = "",*
*       open= "";*
      
*       while(i < oObj.aData.files.length){*
*       var link = "uploads/"+oObj.aData.files[i],*
*           open = 'onClick=window.open("'+link+'"")';*
*           file = file +'<li><a href="#" '+open+' 
>'+oObj.aData.files[i]+'</a></li>';*
*           i++;*
*       }*
*       var fileBtn = filediv+file+'</ul></div>';*
        
*       if((oObj.aData.trip > 0) && (oObj.aData.statusviaje === "19")){*
*       link = 'mapa.php?viaje='+oObj.aData.trip+'';*
*       open = 'onClick=window.open("'+link+'")';*
*       //console.log(open);*
*       mapBtn = '<button ng-click=viaje("'+oObj.aData.trip+'") class="btn 
btn-xs yellow btn-map"><i class="fa fa-map-marker"></i> Map </button>';*
*       mapBtn = ($compile)(mapBtn)($scope);*
*       $('th').append(mapBtn);  *
*       return(bolBtn + fileBtn);*
*       }*
*       else{*
*       return(bolBtn + fileBtn); *
*       }    *
*       } *
*       } *


As you can see I'm trying to Compile the map button I'm appending it to the 
th but the buttons get set on the headers of the table multiple times, 
please help with this, I don't know how to do it




 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to