You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i'm able to serve the files with http server, ng serve. But I want to deploy to tomcat server, I ran the command ng build -prod and got the dist folder created. I need to place the dist folder content inside project folder of webapps. Let say, sampleapp is my project folder, I copied all the contents ,generated in dist folder to sampleapp folder. When i access the application in getting lot of 404 error( http://localhost:8080/vendor/systemjs/dist/system.src.js). It seems Angular is looking in root direectory. How can i customize the build to read it from my project directory?
like http://localhost:8080/sampleapp/vendor/systemjs/dist/system.src.js
I tried editing the index.html tag , and then built. No luck
Which file I have to look out for the ng-build command. Please help me out in finding the solution
The text was updated successfully, but these errors were encountered:
You need to change in index.html <base href="/">
to <base href=".">
All angular.io documentation assume that you will deploy your apps under ROOT http://localhost:8080/ (usually the case with virtual host but not the commons case in tomcat / java world)
Hi,
i'm able to serve the files with http server, ng serve. But I want to deploy to tomcat server, I ran the command ng build -prod and got the dist folder created. I need to place the dist folder content inside project folder of webapps. Let say, sampleapp is my project folder, I copied all the contents ,generated in dist folder to sampleapp folder. When i access the application in getting lot of 404 error(
http://localhost:8080/vendor/systemjs/dist/system.src.js). It seems Angular is looking in root direectory. How can i customize the build to read it from my project directory?
like
http://localhost:8080/sampleapp/vendor/systemjs/dist/system.src.js
I tried editing the index.html tag , and then built. No luck
Which file I have to look out for the ng-build command. Please help me out in finding the solution
The text was updated successfully, but these errors were encountered: