Angular Modernizer
    Preparing search index...

    Traces the payload of outputs from emit sites through host bindings into host handlers.

    Follows the payload of a component's or directive's outputs across the template boundary: where the value is emitted (emit, next, model.set), which host templates bind the output and with which handler, which host method the handler calls with $event, and what that method does with the value (assignments, calls, tests, re-emits). Hosts that do not bind the output are listed as unbound.

    Builds on ComponentHostFinder (hosts, occurrences, bound outputs), collectEventHandlers (handler expressions per element, compiler AST), CallableResolver (host methods, callees) and PayloadTracer (parameter flow in TypeScript). Handlers are joined to host occurrences by template position, so an event of the same name on another element is never attributed to the target. Subscriptions in code (ref.instance.formError.subscribe(e => ...), dialogRef.componentInstance, a viewChild field) are listed as subscribedIn: every read of the output property on a receiver typed as the target or a subclass, other than this, whose chain goes on with subscribe or pipe. Their handler is followed like a dynamic result (DynamicResultFollower).

    Components created in code (DynamicHostFinder: dialogs, createComponent, wrappers) get a dynamic section, the counterpart of emit and binding for a dialog: what the target injects from the creating library (inject(MAT_DIALOG_DATA), matched by package, not by name), where it hands a result back (ref.close(value): a method of the ref type the creation call returns whose parameter is one of the ref's type parameters) and, per creation site, what the caller does with the result (afterClosed().subscribe(r => ...)) with the effects on the callback parameter.

    const flow = new OutputFlowTracer(project).trace({ className: 'ItemComponent', output: 'formError' });
    // flow.outputs[0].emits[0] -> { argument: 'error', in: 'ItemComponent.validate', ... }
    // flow.outputs[0].boundIn[0].bindings[0].steps[0].arguments[0].effects[0]
    // -> { kind: 'write', target: 'p.disabled', in: 'DialogComponent.setFormError' }
    // flow.outputs[0].unboundIn -> [{ component: 'GridComponent', ... }, { component: 'CardComponent', ... }]
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Traces the outputs of the target named by query (all outputs, or the one named by query.output). Without a matched target the result has no target and empty outputs; an output the target does not declare is reported as unknownOutput.

      Parameters

      Returns OutputFlowResult

      Error when the query names neither a class nor a selector.