Search code examples
angulardeploymentweb-hosting

Deploy a simple angular website (Angular)


Is there a specific restriction to deploying a simple angular website to a host server? Is it possible to deploy an Angular app to any hosting server like "Hostinger" or "bluehost" with any chosen plan?


Solution

  • Once you have run ng b --prod and copy over the output files into your host provider, you should be able to access the Angular website itself.

    The only caveat is if you were to access a route (e.g. http://example.com/weather), the browser may attempt to load the content from the /weather subdirectory from your root.

    In order to mitigate this, you have to configure your .htaccess file (Google up for some solutions).