Which are the steps to load an angular application that is in a folder in a Laravel project

105 Views Asked by At

I'm using Laravel 5.4 and Nginx. I built the angular project with the production option, copied the files from the dist folder and placed it in a folder on the public directory of my Laravel application in the remote server. when I click the link to access the index file of the angular application I get no style and the angular application doesn't start (a get the "loading..." text).

When I built the angular project I got very confused by the files generated. There's no images and no references such as to bootstrap.

question updated

My script tag is pointing to a completely weird location

http://www.domain.com.br/services/'/services/inline.65571062838b7e8b694f.bundle.js
1

There are 1 best solutions below

0
On BEST ANSWER

I'm reading a book and the author says that I should use the command

ng build --target=production --base-href '/subfolder/'

Subfolder being the subfolder of the public directory on the server.

When it should be.

 ng build --target=production --base-href /subfolder/

Without quotes. I discover it by trial and error util I get the scripts tag search for the external script files in the right location