Wednesday, August 01, 2018

Angular - deploy your app in a sub folder

 

If you want to deploy your app in a sub folder you need to add the build flag --base-href

This will set the <base href> in the html.

eg: ng build --prod --base-href=/dist/my-app/



Example


C:\Users\xxxx\Documents\works\ng\my-app>ng build --prod --base-href=/dist/my-app/

Date: 2018-08-01T09:13:50.591Z
Hash: 54082fcc1c77e8124a32
Time: 56271ms
chunk {0} runtime.a66f828dca56eeb90e02.js (runtime) 1.05 kB [entry] [rendered]
chunk {1} styles.34c57ab7888ec1573f9c.css (styles) 0 bytes [initial] [rendered]
chunk {2} polyfills.2f4a59095805af02bd79.js (polyfills) 59.6 kB [initial] [rendered]
chunk {3} main.ca74553da7e3e55d6410.js (main) 171 kB [initial] [rendered]


No comments:

Get Indian financial year based on date

This function lets you get the start and end date of Indian financial year based on given date. This can also be modified for US financia...