Skip to content

Template resolver: match page template ID to template component #12

@qantrepreneur

Description

@qantrepreneur

What to build

Implement the template resolver that takes a page's template string and looks up the corresponding template component from the registered templates.

The resolver receives the template registry (populated at build time or from createApp) and the template ID from the page module. Returns the template component or throws a clear error if the template isn't found.

Acceptance criteria

  • resolveTemplate(templateId, registry) returns the matching template component
  • Throws descriptive error when template ID doesn't exist in registry
  • Error message includes the invalid ID and lists available templates
  • Unit tests for: valid lookup, missing template, empty registry

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions