Aman-Mittal opened a new issue, #485:
URL: https://github.com/apache/fineract-backoffice-ui/issues/485
## What happens
Two icons used by the navigation config fail to load on every page, warning
twice per route:
```
[Ionicons Warning]: Could not load icon with name "flash-outline". Ensure
that the icon is
registered using addIcons or that the icon SVG data is passed directly to
the icon component.
[Ionicons Warning]: Could not load icon with name "checkmark-done-outline".
...
```
Wherever these are used, the `<ion-icon>` renders as empty space — no icon,
no fallback, no visible error. It reads as a mildly misaligned label rather
than a missing asset.
## Where they come from
Both names are referenced by the navigation config:
```
src/app/core/services/navigation-config.service.ts:638: icon:
'flash-outline',
src/app/core/services/navigation-config.service.ts:711: icon:
'checkmark-done-outline',
```
...and `addIcons` appears **nowhere** in `src/app`:
```console
$ grep -rn "addIcons" src/app --include=*.ts
(no matches)
```
So the app relies entirely on Ionicons' lazy CDN-style fetch by name. That
is what the warning is complaining about, and it is also why the two failures
are silent: the fetch fails and the component renders empty rather than
surfacing an error.
This is the same subsystem as the `Failed to construct 'URL': Invalid base
URL` exception that fires immediately before each of these warnings — that one
is filed separately, but a fix that registers icons explicitly would likely
resolve both.
## Suggested fix
Register the icon set explicitly with `addIcons({ flashOutline,
checkmarkDoneOutline, ... })` from `ionicons/icons` at bootstrap, rather than
depending on name-based lazy loading. That makes the icons resolve
deterministically, removes the runtime fetch, and means a typo in a
`navigation-config` icon name fails at build time instead of rendering blank in
production.
At minimum, the two names above need to resolve to something.
## Environment
Reproduced against a clean checkout of `main` (`a24a06ba`) served with `ng
serve`, Chrome. Both warnings fire on every route load, including a hard reload
with cache disabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]