Closed fabienmoyon closed 4 years ago
Information: This error appears only on dev platform with production deployment
The reason, in the frontend, we setup default icon for angular material:
$mdIconProvider.defaultIconSet('images/mdi/mdi.svg', 24);
And this performs a request to ESN backend to get the mdi.svg
resource.
Because with Webpack devServer proxy, we forward the request from localhost:9900
to server base URL, then the request is:
https://dev.open-paas.org/images/mdi/mdi.svg
And it works like before in the old code base
Because the base URL of SPA has additional route: https://dev.open-paas.org/contacts/ Then the mdi request becomes:
https://dev.open-paas.org/contacts/images/mdi/mdi.svg
And the request is 404
We need to make mdi.svg available on any mode of deployment. And we should not send the request to server to get this kind of resource like we did for templates.
And because we have 2 places to set default icon for material at core and inbox
So solution is serving the mdi.svg in frontend and having 1 global config block to set default icon
Steps:
mdi.svg
in esn-frontend-common-libs
CURRENT
settings-overlay
component don't display material design iconsprofile-menu
component don't display material design iconsEXPECTED
TO DO