Comments (5)
Good catch 👍 It's a bug I didn't consider.
I'm on it.
from angular-datatables.
Mmh I can't really find a solution within the module.
But, you can solve this by adding the ng-if
directive, for example like this:
<table datatable="ng" dt-options="dtOptions" class="row-border hover" ng-if="users.length > 0">
<thead>
<tr>
<th>date (ISO)</th>
<th>name</th>
<th>email</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr dt-rows="" ng-repeat="user in users">
<td>{{ user.date }}</td>
<td>{{ user.name }}</td>
<td>{{ user.email }}</td>
<td>actions</td>
</tr>
</tbody>
</table>
<p ng-show="users.length == 0">No result</p>
from angular-datatables.
Yeah, that's what I'm doing now (the ng-if stuff). But I'd rather show the table with no rows. So the user can still see the table headers. Seems more user friendly to me.
But for now I'll stick with the ng-if solution.
from angular-datatables.
Code works if we give the array directly to the scope, but not working when fetching the data from promises 😢
from angular-datatables.
Fixed at last! 😄
from angular-datatables.
Related Issues (20)
- ngTemplateRef does not work on responsive windows-mode when columns are stacked HOT 3
- AngularJS row reorder feature available or not
- Angular 17 responsive only works on initial load HOT 1
- Upgrade to DataTables.net v2 and swap out @types/datatables.net for the built-in types HOT 4
- Pagination not working with (bootstrap) tabs HOT 10
- After migration to angular 16, ngtemplateRef Breaks HOT 1
- Cannot read properties of undefined (reading 'options') when attempting to install angular data-tables. HOT 2
- ngTemplateRef cause the issue if visible = false HOT 1
- Issue related to missing index.d.ts file in node_modules HOT 2
- Use FixedHeader with server side pagination HOT 1
- Datatable is not working even after installing properly in my angular application HOT 2
- Add Support for Angular 18 HOT 7
- Bug in rerender datatable HOT 9
- CANNOT FIND NAMESPACE DATATABLES HOT 4
- Can't resolve 'node_modules/datatables.net/js/jquery.dataTables.min.js' HOT 4
- Angular 17 with Angular-Datatables: Unable to Re-render DataTable HOT 1
- *ngFor Directive Better Alternatives HOT 2
- Cannot make your code sample [Using Angular TemplateRef] working HOT 2
- Cannot make your code sample [Router-link] runnning HOT 2
- Custom components in render HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-datatables.