Sunday 21 April 2019

Node + Pug. How to Filter data without reloading page

I suppose the best example of what I want is nomadlist.com If you click the filters:1) the url changes (think using pushState)2) the filtered data comes back from backend3) But the whole page doesn't refresh. Spinner spins. Data reloads.I've got it to a stage where if on click on the filters, you get a different response back from the backend. But I've got to loop through this response and append to a div (or reload just part of the page)I think I could use .innerHTML , but just doesn't feel right. I'd rather pass the data into a mixin somehow (but not quite sure how that's possible).Advice welcome. Thanks a lot for any help. Not keen on using JQuery.

Submitted April 21, 2019 at 01:25PM by harrydry

No comments:

Post a Comment