Skip to content
@ng-doc/ui-kit / Class

NgDocIconRegistry

Loads SVG icons and keeps them for the lifetime of the application.

Every URL is requested once and shared by all icons that show it, whether or not the application registers HTTP interceptors. A failed request is logged and remembered: reading the icon again does not send a new request, only retry() does. A response that is not SVG markup counts as a failure: dev servers answer a missing file with the application's index.html, which must not be rendered as an icon.

Decorators
@Service
DeclarationTypeScript
@Service()
export class NgDocIconRegistry { … }

Members

Methods

2
(…): Signal<string | null>

Returns the SVG markup stored at url, loading it on the first call.

(…): void

Requests url again if its last request failed. Does nothing for an icon that has loaded or is loading.

Symbol
Kind
Class
Decorators
@Service
Scope
@ng-doc/ui-kit
Edit this page