You have to handle url rewriting server-side for that.
Depending on your server, you'll have to add:
In apache (.htaccess for example) :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule !\.\w+$ index.html [L]
</IfModule>
If you're using grunt and grunt-contrib-connect, just add a middleware (modRewrite) with this regexp :
connect: {
options: {
port: 9002,
hostname: 'localhost' // put here any ip if you want external access
},
dev: {
options: {
middleware: function(connect) {
return [
//modRewrite is used to handle properly angularjs' html5 mode
modRewrite([
'^[^\\.]*$ /index.html [L]'
])
]
}
}
}
}
ps: that your main entry point must be index.html in this case.
pps: you may have to tune this regexp for specific cases.