Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

how to use [fnServerParams] ? #10

Closed
think2011 opened this issue Apr 18, 2014 · 3 comments
Closed

how to use [fnServerParams] ? #10

think2011 opened this issue Apr 18, 2014 · 3 comments

Comments

@think2011
Copy link

how to use [fnServerParams], Please help me.

@l-lin
Copy link
Owner

l-lin commented Apr 18, 2014

You cannot use fnServerParams with the current version of angular-datatables. I plan to do it soon.

For now, you can use the function DTOption.withFnServerData(fn) to override the ajax function.
You can find an example in the datatables directive.

@l-lin
Copy link
Owner

l-lin commented Apr 18, 2014

You are now able to use fnServerParams.
For example:

$scope.dtOptions = DTOptionsBuilder.fromSource('yoursource.json')
  .withOption('fnServerParams', function ( aoData ) {
    aoData.push( { "name": "more_data", "value": "my_value" } );
  }

@l-lin l-lin closed this as completed Apr 18, 2014
@think2011
Copy link
Author

:D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants