我一直试图在本地处理以下数据表:http://l-lin.github.io/angular-datatables/#/welcome,但是分页无法正常工作,有时会加载,但大部分时间却无法加载。当我使用ng build --prod --aot编译程序并将其上传到AWS S3服务器时,分页将永远不会加载。
这是我的代码
component.ts
for datafile in datafolder:
# open file in read mode
o_csvFile = open(datafile)
# get the 5th line
fifthLine = linecache.getline(roverFile, 5)
# use while loop to read each line in file
startReading >= fifthLine
while startReading:
line = o_csvFile.readline()
HTML
dtOptions: any = {};
ngOnInit() {
this.dtOptions = {
pageLength: 8,
responsive: true,
language: {
search: 'Búsqueda',
lengthMenu: 'Cantidad _MENU_ registros por pagina',
emptyTable: 'No hay datos disponibles',
info: 'Registro _START_ a _END_ de _TOTAL_ consultados',
infoEmpty: 'Registro 0 a 0 de 0 consultados',
paginate: {
first: 'Primero',
last: 'Ultimo',
next: 'Siguiente',
previous: 'Anterior'
}
}
};
}
}
感谢您的帮助。