Datatable Pagination not working with angularjs
up vote
0
down vote
favorite
I create a new project with Laravel and Angular JS, my problem is when I load data to the DataTable the pagination is not working.
My HTML code:
<tbody>
<tr ng-repeat="Language in viewLanguages">
<td>[[$index + 1]]</td>
<td>[[Language.LangName]]</td>
<td>[[Language.LangCode]]</td>
<td><button ng-click="showDataForEdit(Language)" data-toggle="tooltip" data-original-title="Edit Data" class="btn btn-xs btn-warning"><i class=" fas fa-pencil-alt "></i></button>
<button data-toggle="tooltip" data-original-title="Delete Data" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button></td>
</tr>
</tbody>
My Angularjs Code is,
var app = angular.module("languageApp", );
app.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
app.controller('languageController', function($scope, $http) {
$scope.viewLanguages="";
$scope.viewLanguages1=function(){
var FormData={"condition":''};
$http({
method : "POST",
url : "language/view",
data: FormData,
}).then(function(response) {
//console.log(response)
$scope.viewLanguages=response.data;
$('#datatable-language').DataTable();
}, function(response) {
//console.log(response)
});
}
})
Image
How to solve this???
Thank you.
angularjs laravel datatable datatables pagination
add a comment |
up vote
0
down vote
favorite
I create a new project with Laravel and Angular JS, my problem is when I load data to the DataTable the pagination is not working.
My HTML code:
<tbody>
<tr ng-repeat="Language in viewLanguages">
<td>[[$index + 1]]</td>
<td>[[Language.LangName]]</td>
<td>[[Language.LangCode]]</td>
<td><button ng-click="showDataForEdit(Language)" data-toggle="tooltip" data-original-title="Edit Data" class="btn btn-xs btn-warning"><i class=" fas fa-pencil-alt "></i></button>
<button data-toggle="tooltip" data-original-title="Delete Data" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button></td>
</tr>
</tbody>
My Angularjs Code is,
var app = angular.module("languageApp", );
app.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
app.controller('languageController', function($scope, $http) {
$scope.viewLanguages="";
$scope.viewLanguages1=function(){
var FormData={"condition":''};
$http({
method : "POST",
url : "language/view",
data: FormData,
}).then(function(response) {
//console.log(response)
$scope.viewLanguages=response.data;
$('#datatable-language').DataTable();
}, function(response) {
//console.log(response)
});
}
})
Image
How to solve this???
Thank you.
angularjs laravel datatable datatables pagination
1
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I create a new project with Laravel and Angular JS, my problem is when I load data to the DataTable the pagination is not working.
My HTML code:
<tbody>
<tr ng-repeat="Language in viewLanguages">
<td>[[$index + 1]]</td>
<td>[[Language.LangName]]</td>
<td>[[Language.LangCode]]</td>
<td><button ng-click="showDataForEdit(Language)" data-toggle="tooltip" data-original-title="Edit Data" class="btn btn-xs btn-warning"><i class=" fas fa-pencil-alt "></i></button>
<button data-toggle="tooltip" data-original-title="Delete Data" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button></td>
</tr>
</tbody>
My Angularjs Code is,
var app = angular.module("languageApp", );
app.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
app.controller('languageController', function($scope, $http) {
$scope.viewLanguages="";
$scope.viewLanguages1=function(){
var FormData={"condition":''};
$http({
method : "POST",
url : "language/view",
data: FormData,
}).then(function(response) {
//console.log(response)
$scope.viewLanguages=response.data;
$('#datatable-language').DataTable();
}, function(response) {
//console.log(response)
});
}
})
Image
How to solve this???
Thank you.
angularjs laravel datatable datatables pagination
I create a new project with Laravel and Angular JS, my problem is when I load data to the DataTable the pagination is not working.
My HTML code:
<tbody>
<tr ng-repeat="Language in viewLanguages">
<td>[[$index + 1]]</td>
<td>[[Language.LangName]]</td>
<td>[[Language.LangCode]]</td>
<td><button ng-click="showDataForEdit(Language)" data-toggle="tooltip" data-original-title="Edit Data" class="btn btn-xs btn-warning"><i class=" fas fa-pencil-alt "></i></button>
<button data-toggle="tooltip" data-original-title="Delete Data" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button></td>
</tr>
</tbody>
My Angularjs Code is,
var app = angular.module("languageApp", );
app.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
app.controller('languageController', function($scope, $http) {
$scope.viewLanguages="";
$scope.viewLanguages1=function(){
var FormData={"condition":''};
$http({
method : "POST",
url : "language/view",
data: FormData,
}).then(function(response) {
//console.log(response)
$scope.viewLanguages=response.data;
$('#datatable-language').DataTable();
}, function(response) {
//console.log(response)
});
}
})
Image
How to solve this???
Thank you.
angularjs laravel datatable datatables pagination
angularjs laravel datatable datatables pagination
edited Nov 21 at 7:13
asked Nov 21 at 4:07
JIJOMON K.A
461115
461115
1
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16
add a comment |
1
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16
1
1
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405127%2fdatatable-pagination-not-working-with-angularjs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Use the angular datatables directives -> l-lin.github.io/angular-datatables/archives the only sane answer.
– davidkonrad
Nov 22 at 10:16