injectView function

Module @runic-artifex/angular in @runic-artifex/angular 0.23.0

function injectView<TClient extends ViewClient>(source: Signal<ViewSource<TClient>> | ViewSource<TClient>, options?: InjectViewOptions<TClient>): ViewHandle<TClient>;

Connects a generated View reference for the lifetime of the injection context (normally a component) and exposes its state as signals. Pass a signal, such as a page input, to follow it: a changed reference releases the previous client and connects the new one. A released client stays connected for keepAlive milliseconds (2000 by default), and the next injectView of the same reference takes it over with its state: an @if that toggles, HMR and A→B→A navigation show the View at once instead of opening the route again. A reference is identified by its connect function, so a signal producing a new { connect: connectShell } object does not reconnect.