Answer the question
In order to leave comments, you need to log in
How to force the browser to take files from the right place?
I write spa. Made a router.
And with normal paths like /startGame, the browser loads files from here
localhost :4200/img/src
But when the path is complex like /level/1, it tries to find files in localhost:4200/level/img/src
in the first case?
Answer the question
In order to leave comments, you need to log in
You forgot to include a leading slash in resource addresses.
here is an explanation with examples
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question