Node+ejs renders the page, and the page does not change after the data is changed.

do paging. On the first page, the background res.render ("admin/article.html", {data:data})
Click the second page to re-query the database and query successfully to make sure that the data has changed. The page has not changed. What should be done?

Mar.09,2021

1. If you want to achieve no jump paging, you need to use ajax. The template engine just links view and model, not loading
2 asynchronously. If you just want to click "next page" and jump to the new page content, set the route corresponding to [next page], and then use the same template to output, of course, the data will see a change


to solve the problem. Since it did not actively refresh the page itself, I actively requested the current page, the current url. of window.localtion.href=, in the success function of ajax. It should not be a good way, but it should be solved.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3550b-2bf91.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3550b-2bf91.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?