Skip to content

[10] feat(angular): extract template control flow #17

Description

@fernandofielmann

Goal

Represent Angular template control-flow constructs after template/component linkage is stable.

Scope

  • Extract legacy structural directives such as *ngIf, *ngFor, and *ngSwitch where statically identifiable.
  • Extract modern Angular blocks: @if, @for, and @switch.
  • Preserve source ranges, branch/block kind, and nesting relationships.
  • Associate referenced component members conservatively without evaluating template expressions.
  • Avoid imposing runtime branch execution or collection cardinality.
  • Use the bounded template extractor/grammar introduced by [09] feat(angular): link templates, selectors, and bindings #16.

Dependencies

Acceptance criteria

  • Legacy and modern control-flow syntax is represented with deterministic nesting.
  • else, @else, @empty, and switch cases retain their structural association.
  • Malformed or unsupported dynamic expressions do not crash indexing or create guessed edges.
  • Inline and external templates behave equivalently.
  • Sequential and parallel pipelines emit equivalent results.
  • Graph schema and README document the control-flow representation.

Validation

  • Add positive, negative, nested, malformed, mixed-syntax, and parity fixtures.
  • Run Angular template/edge suites, lint-ci, and scripts/test.sh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions