Z
Z
zhdoon2019-04-16 12:13:54
Angular
zhdoon, 2019-04-16 12:13:54

Can I set my angular 7 app to run in a non-root folder?

I build the application ng build --prod The application is in the /dist/myapp/ folder I copy the contents of this folder to the remote server in the folder / Everything is ok.
It is necessary that the application works correctly in the /app/ subfolder, for example. Connected files, routing, etc. worked correctly. Maybe in the base-href or in the angular.json application config, maybe somewhere else there is an opportunity to configure it?
The variant with document_root = /app/ is not suitable.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
ValeraValera, 2019-04-16
@cluberr

You should read this https://angular.io/guide/deployment

D
Demian Smith, 2019-04-16
@search

ng build --prod --base-href /app/should help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question