Dear Support Team,
I am encountering an issue with the message section in my application. When I click on the message section, I expect to see all the mails displayed in the view. However, no mails are being displayed.
Observations:
Upon inspecting the application, I noticed that the GetAll API responsible for fetching the messages is not being triggered.
I placed a debugger in both:
The front-end code where the GetAll API function is called.
The back-end code of the corresponding function.
However, neither of these debuggers is being hit, indicating the API is not being invoked at all.
Request:
Could you please guide me on potential reasons for this behaviour?
Are there any specific areas I should check in the front-end or back-end configuration that might cause the API not to trigger?
I look forward for your response.
Many thanks.
3 Answer(s)
-
0
Hi @Jorahealth
Are there any errors in the backend logs here? If so, can you share them? Make sure that the getAll method of the messageServiceProxy class is triggered in the Angular code. Make sure that you inject the MessageServiceProxy class in the constructor.
-
0
Hi,
We have encountered an issue in our Angular application after updating to Angular 18 and the latest PrimeNG versions.I've removed the return statement after paginator.changePage(0), ensuring the API call is made even when resetting pagination.
Removing return allows the API to be called after resetting the paginator, ensuring data is fetched and displayed correctly.
Does this approach align with best practices, and is it the recommended solution for resolving this issue? If not, do you suggest an alternative way to handle pagination resets and API invocation, please?
Many thanks.
-
0
Hi @Jorahealth
Here, when the event is null, it will enter this if block. If there is data in the records, the return will be filled. It is used like this by default. The purpose here is that if the event table settings are null and there is data in the records, the data will be listed in the table, so that there is a check like this. However, if you remove the second check and there is data coming from the API in the records, the table will not be listed.
if (this.primengTableHelper.shouldResetPaging(event)) { this.paginator.changePage(0); if (this.primengTableHelper.records && this.primengTableHelper.records.length > 0) { return; } }