문제

Could anyone explain why when I click on a link my angular views get shown fine but when I type in an address into the address bar in the browser (which is the same as where the links that work point to) such as localhost:8080/login I get a Cannot GET /login message.

My routes are set up in Angular and I'm using Node and Express 3 on the back-end.

What silly mistake am I making?

도움이 되었습니까?

해결책

Most likely you're getting angular and your webserver mixed up.

The webserver probably doesn't know to server your angular base page when the /login URL is entered. You need a catch-all handler on your nodejs server.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top