Struggling to incorporate pagination and sorting in the frontend after retrieving data from nodejs. Trying to follow a guide per this link: here
While attempting to apply a similar logic, there seems to be an issue as it's not functioning correctly. Here is the TypeScript file:
import ... // Code snippet here
and the HTML file:
<div id="#main-body">
<!-- HTML markup here -->
</div>
And the SCSS:
#main-body {
padding-top: 20px;
}
... // SCSS styles continue
My approach involves fetching all the data during ngOnInit()
, then applying sorting and pagination during ngAfterViewInit()
. However, the functionality is not working as expected. The webpage shows sorting arrows but clicking on them doesn't trigger any action, and the pagination buttons are visible but non-functional.
Here is a screenshot of the current webpage:
https://i.sstatic.net/xo0S2.png