This happpens with room URL like http://127.0.0.1:8080/matrix/client/#/room/#public:localhost. The second hash part is transferred to the next page when using $location.path.
Basic Usage
-----------
The Synapse web client needs to be hosted by a basic HTTP server.
You can use the Python simple HTTP server::
$ python -m SimpleHTTPServer
Then, open this URL in a WEB browser::
http://127.0.0.1:8000/