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.

Menu