Not sure if this can work. Created new angular-cli project, run ng serve and opened browser. It worked.
Run ng build --prod
, created dist folder with index.html and number of js bundles.
I then opened index.html in browser. Hangs waiting for javascript (so I just see "loading ...").
Should this work? And if not, could someone explain why?
You should not just open this file. Web server is what you need for production usage.
If you want to serve build version of application using built in server, you can use ng serve --prod
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With