Terminology

#foo : slashless scheme

: slashless scheme #/foo : slashy scheme

Background

There are certain legacy parts of the application which use (and rely on) the slashless scheme. I would like to introduce Angular routing (probably with ui-router) in a non-destructive way, such that doesn't interfere with the legacy routing so that part of the application could be gracefully phased out over time. Once that happens the all-angular app could switch to the slashy scheme all at once.

So far

I tried setting $locationProvider.hashPrefix('') to an empty string, but it seems you can only set the string between # and / , so that didn't work.

Options

It seems I can either

rewrite legacy parts of the app, or

rewrite Angular's $locationProvider.hashPrefix to include '/' by default. Therefore setting it to '' would become meaningful.

Both of these options seem very time-consuming.

Do you know about a better way to make Angular recognize the slashless scheme?