Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

http://jsfiddle.net/N7Bws/2

    $scope.overrideOptions = {
        "bStateSave": true,
        "iCookieDuration": 2419200, /* 1 month */
        "bJQueryUI": false,
        "bPaginate": true,
        "bLengthChange": true,
        "bFilter": true,
        "bInfo": true,
        "bDestroy": true,
        "sDom":'<"toolbar"lfrtip>'
    };


   angular.element('div.toolbar').html('foo');

i can't seem to customize the toolbar using this implementation. could someone point out what i'm doing wrong?

share|improve this question
up vote 1 down vote accepted

You have your append code in controller. It needs to be done in directive, after plugn creates the toolbar.

// apply the plugin
var dataTable = element.dataTable(options);
/* now can add to toolbar*/
$('.dataTables_wrapper .toolbar').prepend('<div>Toolbar insert</div>'); 

DEMO

share|improve this answer
    
that was it. thank you. – Michael Dec 1 '13 at 23:27
    
there are also options to add elements to toolbar using sDom config in plugin. I've done what you are doing before though also. Simpler to figure out – charlietfl Dec 1 '13 at 23:28
    
you mean beyond the standard examples from their site? – Michael Dec 2 '13 at 4:04
    
yes...once you figure out the syntax, can add elements....has always been a bit coonfusing to me...so I find it simpler doing it with own code like you startd with – charlietfl Dec 2 '13 at 4:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.