Will Tower Will Tower - 2 months ago 8
AngularJS Question

Angular CLi's "ng build" doesn't produce a working project?

(I'm new on planet Angular2 (emigrated from dying planet

Flex/Actionscript, so please forgive this naive question)


Have I made a fatal error in thinking that after running the "ng build" command on my project from

Angular CLi
, I would end up with a functioning project in the directory "dist" – which I could just run in a browser, put up on a server?

I end up with a folder full of correctly named stuff, etc. Is there a step I am missing here?

enter image description here

Answer

I'm new to angular, and just ran into the same issue. You can open up and run the Index.html file in the browser directly from the file system, but you have to edit the path of the base href attribute in Index.html from:

<base href="/">

to:

<base href="./">
Comments