Help a newbie with loading a new page

13 views
Skip to first unread message

Rich Podraza

unread,
Oct 3, 2016, 9:08:27 AM10/3/16
to nodejs
I'm new to web development (have a C++/Java background) I'm looking for some help with some simple modification I'm making to the node-login project as an exercise.

I hope I can describe my problem helpfully without posting a bunch of code here. I've added a button to the home page (modifying the home.jade) that is supposed to navigate to a new page I've made called "about". I've added an about.jade, and the get handler in routes.js. I've added the button handling code in homeController.js.

So my button doesn't work. However, I can manually navigate to localhost:3000/about and the page loads fine. When I set breakpoints I can see that both clicking the button and navigating manually result in the routes.js get function executing and calling render for my about page. I can also see with the Firefox debug network activity log that I get a response with the expected HTML for my GET about, and the HTML is the same for both methods.

The only difference I can see is with the manual navigation method that works, I also get a bunch of GET exchanges for some scripts included in about.jade. With the button method, those don't fire. The log stops with GET about.

Any ideas? I'm not sure where to look. Any other info I can provide?

Thanks!

Ryan Schmidt

unread,
Oct 6, 2016, 10:40:04 AM10/6/16
to nod...@googlegroups.com
I'm not sure how to help you, without seeing your code.

Maybe let's start with...

What is the code you added to the jade template?

What is the HTML that was generated by that addition?


Reply all
Reply to author
Forward
0 new messages