Skip to content

Idea: Component with its own PHP #331

@g105b

Description

@g105b

If we have a custome-element.html, why no custom-element.php with its own go function?

A special case for the ServiceContainer could provide an HTMLElement already referencing the correct element.

This is how remix does it: https://remix.run/ - a custom element like <invoice-item> can have its view in invoice-item.html and logic in invoice-item.php - the go function will need to know what invoice is being referenced.

Two ideas on how to solve this:

  1. Use the dynamic path as before.
  2. Bind an attribute to the custom element, like an ID, from the page's go function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNon-breaking improvements to existing behaviourquestionUsage questions or clarification requests

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions