hi guys i used angular datatable i completed every thing but am getting some Error which showned by image below .how to rectify this Error
Error:
[$injector:modulerr] Failed to instantiate module MyApp due to:
Error: [$injector:modulerr] Failed to instantiate module datatables due to:
@* CSS *@
@* JS for angularJS and Datatable *@
var app = angular.module('MyApp', ['datatables']);
app.controller('homeCtrl', ['$scope', '$http', 'DTOptionsBuilder', 'DTColumnBuilder',
function ($scope, $http, DTOptionsBuilder, DTColumnBuilder) {
$scope.dtColumns = [
DTColumnBuilder.newColumn("EmployeeName", "EmployeeName"),
DTColumnBuilder.newColumn("Department", "Department"),
DTColumnBuilder.newColumn("DateofBirth", "DateofBirth"),
DTColumnBuilder.newColumn("Designation", "Designation"),
DTColumnBuilder.newColumn("ReportingManager", "Reporting Manager")
]
$scope.dtOptions = DTOptionsBuilder.newOptions().withOption('ajax', {
url: "/Datatable/GetAlldata",
type: "GET"
})
.withPaginationType('full_numbers')
.withDisplayLength(10).withButtons([
'columnsToggle',
'colvis',
'copy',
'print',
'excel',
{
text: 'Some button',
key: '1',
action: function (e, dt, node, config) {
alert('Button activated');
}
}
]);
}]);
Tejas TrivediPosted Oct 24, 2016, 6:39 AM
Benmakhlouf SaadPosted Oct 24, 2016, 5:46 AM
Pradeep ShetPosted Oct 20, 2016, 3:01 AM