Closed fabioformosa closed 3 years ago
The webjar build succeeds but the js/css are not correctly loaded because the base tag of the index.html is /
It's possible to use the routing approach based on APP_BASE_HREF
https://angular.io/api/common/APP_BASE_HREF
( https://stackoverflow.com/questions/46190280/angular-2-set-app-base-href-with-a-value-from-a-promise-observable https://stackblitz.com/edit/angular-m4ny7q )
UPDATE: it's not possible using APP_BASE_HREF with a factory function that retrieves the contextPath with a http call. The http would need the contextPath and, anyway, is not possible to return a promise in the factory used by APP_BASE_HREF
Followed this proposed solution: https://stackoverflow.com/questions/38112891/angular-2-4-5-set-base-href-dynamically
Follow this guide: https://shekhargulati.com/2017/11/08/a-minimalist-guide-to-building-spring-boot-angular-5-applications/