1 year ago

#385627

test-img

BNKS1972

<A ng-href="#/about" tries to open /#!#%2Fabout on the browser instead of /#/about and fails

I am working on a single page angular web app using node.js as webserver to serve index.html

In index.html I have this ng-href tag:

<a ng-href="#/about">About</a>

I ran the following command on terminal to fire up node server

node server.js

index.html loads fine when I goto http://localhost:3000 or http://localhost:3000/# on my browser. But when I click on "About" button, a very weird issue is happening. It tries to open the escaped path http://localhost:3000/#!#%2Fabout instead of http://localhost:3000/#/about

What's even weird is that when I hover over the "About" button, in the bottom left of browser I see it resolves to http://localhost:3000/#/about. But when I click the button, the URL at the top is http://localhost:3000/#!#%2Fabout instead. Hence the About page doesn't show up. Why is my URL being escaped?

I have spent quite some time trying to debug this.

javascript

html

node.js

angular

angularjs

0 Answers

Your Answer

Accepted video resources