ng-xtend API documentation
    Preparing search index...

    Class XtResolverService

    An all in one helper class, enabling manipulation of the context, with data and type associated with it.

    Index

    Constructors

    Properties

    listComponents: Signal<XtComponentInfo<any>[]> = ...

    Computed signal that lists all registered components.

    listPlugins: Signal<XtPluginInfo[]> = ...

    Computed signal that lists all registered plugins.

    pluginRegistry: XtPluginRegistry = ...

    Injected plugin registry for component and type registration.

    resolver: XtResolver

    The resolver used to find components for a given context.

    typeResolver: XtTypeResolver

    The type resolver for type hierarchy and reference resolution.

    Methods

    • Resolves the type name for the given context and optional sub-name.

      Type Parameters

      • T

      Parameters

      • baseContext: XtContext<T>

        The context to query

      • OptionalsubName: string

        Optional sub-name for nested type resolution

      • Optionalvalue: T

        Optional value for type inference

      Returns string | null | undefined

      The type name, or null/undefined

    • Injects the given stylesheets in the current page, so that a plugin's styles get applied. Absolute urls (http/https/protocol-relative) are used as-is, relative ones are resolved against the plugin's base url. Already injected stylesheets are skipped.

      Parameters

      • pluginName: string

        the name of the plugin owning those styles

      • baseUrl: string

        the plugin base url, used to resolve relative css urls

      • OptionalcssUrls: string[]

        the stylesheet urls declared by the plugin

      Returns string[]

      the list of stylesheets actually injected by this call

    • Injects in the current page the stylesheets declared by a registered plugin, if any. Relative urls declared by the plugin are resolved against the given remoteEntry url.

      Parameters

      • pluginName: string

        the registered plugin name

      • remoteEntryUrl: string | URL

        the url the plugin has been loaded from

      Returns string[]

    • Dynamically load a register a plugin from the given url The plugin must export at least a Register entrypoint that will be called right after loading.. Any stylesheet declared by the plugin (XtPluginInfo.cssUrls) is loaded in the current page.

      Parameters

      Returns string | null

      the registered plugin name, or null if registration failed.