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

Commit

Permalink
Throw error if using serverSide not with Ajax renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
l-lin committed Sep 3, 2015
1 parent cfaaef8 commit 5488f98
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dist/angular-datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,10 +1132,16 @@ function dtRendererFactory(DTDefaultRenderer, DTNGRenderer, DTPromiseRenderer, D

function fromOptions(options, isNgDisplay)  {
if (isNgDisplay) {
if (options.serverSide) {
throw new Error('You cannot use server side processing along with the Angular renderer!');
}
return DTNGRenderer.create(options);
}
if (angular.isDefined(options)) {
if (angular.isDefined(options.fnPromise) && options.fnPromise !== null) {
if (options.serverSide) {
throw new Error('You cannot use server side processing along with the Promise renderer!');
}
return DTPromiseRenderer.create(options);
}
if (angular.isDefined(options.ajax) && options.ajax !== null ||
Expand Down
Loading

0 comments on commit 5488f98

Please sign in to comment.