I am using Angular UI Router in my angular app and i have enabled HTML5 mode to remove the # form the URL by using $locationProvider in the config.
You need to to setup url rewrite on server side
for apache it would be something like:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.html
in .htaccess
file(be sure that mod_rewrite
apache module is enabled)
and config like this for nginx:
location / {
....
try_files $uri $uri/ /index.html =404;
}