I have bootstrap twds via npm installed and used the Bootstrap navbar, but none of the links work. Clicking on them changes the URL to the correct one, but it doesn’t actually go to that page. I have simple links setup like this:
That message is rendered on the console, but only if I manually enter the URL in the browser and press enter. When clicking the actual link on the nav bar, I can see the URL change to the correct one, but nothing happening after that. Shouldn’t it actually go to the page without issue? Here’s my main template:
I put it in a file called routes.js under /lib. I don’t see any errors on clicking no. On the console, my jquery version is “1.11.2”. Could there be something blocking the click event?
Can’t really say that based on the info. You will need to do some debugging. If it works with google.com it looks like an issue in Meteor/FlowRouter not in jQuery.
When clicking on the link “Click me” - the template actually renders correctly. The problem is, it refuses to render again if the template being loaded has the same name. All my routes load the same template:
Ah clear! Yes that’s intended by FlowRouter and that’s fine for you. You don’t want to re-render the whole template, you just want to re-render the table.
To do that we need to make the selector reactive. Can you show me the helper for selector?
That should do the trick after some debugging. What you actually want, if this works, is making that getproduct() method reactive. Now it will rerun the helper because I added a reactive function in it.
Hi @lucfranken, the problem is, there are several other items on the page that need to be re-rendered as a result of filtered data from MongoDB, e.g. a count of logins. Therefore, I’d like to re-render the template each time a URL change occurs, despite it being the same template on the URL. Is there a way to re-render the whole template?
We use just console logs mostly but I assume you can also use some kind of debugger. Trick is to have small parts, small templates, and everything reactively working. You are now debugging something which seems to have lots of issues regarding reactivity. Sometimes it’s better to just fix them all.