upload dist folder for test code example
Example 1: angular prod apache config for route
Option 2: .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
RewriteRule ^ index.html [L]
</IfModule>
Example 2: angular build with configuration
ng build --prod
ng build --configuration="test"
ng build --configuration="staging"