The problem is that you have enabled html5
, so that the routing system works correctly using $locationProvider.html5Mode(true);
you must also define the root of your app. This is done inside your head through the
<base href="/">
</head>
Or, if your app has a different root folder, set it there, for example:
<base href="/app/">
//ou
<base href="/app/adm/">
Another point to note is that with this method your links might break, one solution would be to use /
before setting your links, such as css
, script
, etc. For example, the following css
:
<link rel="stylesheet" href="dist/css/main.min.css">
It would look like this:
<link rel="stylesheet" href="/dist/css/main.min.css"> //Note a barra invertida antes do dist
Also remember that for different servers, there are different solutions, for example, in apache I needed to enable the module rewrite
, and so on. Testing with these solutions I gave you, if it still does not solve, your problem may be related to the server you are using.