fabioformosa / quartz-manager

REST API and UI Console Manager for Quartz Scheduler. This is a Java Library & UI embeddable single page app, to control and monitor jobs scheduled with Quartz Scheduler
Apache License 2.0
239 stars 87 forks source link

Pluggability - Create a webjar for the frontend #22

Closed fabioformosa closed 3 years ago

fabioformosa commented 4 years ago

Follow this guide: https://shekhargulati.com/2017/11/08/a-minimalist-guide-to-building-spring-boot-angular-5-applications/

fabioformosa commented 3 years ago

The webjar build succeeds but the js/css are not correctly loaded because the base tag of the index.html is /

fabioformosa commented 3 years ago

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 )

fabioformosa commented 3 years ago

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

fabioformosa commented 3 years ago

Followed this proposed solution: https://stackoverflow.com/questions/38112891/angular-2-4-5-set-base-href-dynamically