How to load DataTable to a dynamic table in AngularJs 1.6.9
How to load DataTable to a dynamic table in AngularJs 1.6.9
ledTapiaG
Posts: 1Questions: 1Answers: 0
This table changes every time fields are filled and services are consumed.
{{item.objectPK}} | {{item.objectType}} | {{item.systemName}} | {{item.systemType}} | {{item.severity}} | {{item.traceDate}} |
I am consuming DataTable as follows
$scope.filterTrace = function () { $scope.TraceFilter = { objectPK: $scope.objectPK, objectType: $scope.type, systemName: $scope.systemName, systemType: $scope.systemType, severity: $scope.selectSeverity, traceDate: $scope.traceDate }; $http.post("/api/Trace/FilterTraceInfo", $scope.TraceFilter) .then(function (responce) { $scope.TraceInfo = responce.data; angular.element(document).ready(function () { $.extend($.fn.dataTable.defaults, { info: false, searching: false, ordering: false, "language": { "url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json" } }); dTable = $('#traceTable') dTable.DataTable(); }); if ($scope.TraceInfo == "") { alert("No se a encontrado ningun valor"); } }, function errorCallback(responce) { alert("No se a encontrado ningun valor"); }); }The mode and the controller are correct, I guess my problem lies in how I consume the DataTable
This discussion has been closed.