Although the Lugg clause certainly works, it only applies if you don't have a web server. You must organize your client application separately from your server application or at least place your server application in a folder above your doc root.
The client application will be configured as a static website. Your web server will handle the maintenance of index.html and all replicated Angular files. Your HTML and Angular / Javascript will handle requesting partial, js modules, etc. Thus, you benefit from all the functions and modules of your web server.
Then the server side can be designed to listen to API requests and respond to them. It should not deliver your client application files. Usually it should deliver JSON responses.
This approach is simpler and creates a good client / server separation. It keeps the server side focused on data delivery, while the client side focuses on processing the user interface. This separation of concerns also allows other clients to write and chat with your server application.
I believe my answer is simply an extension of Hodes answer. I tried to make my answer more explicit, but I think the general idea is the same.
Darryl
source share