Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow assign directive to chain directly off of the tagname interpolation #10

Closed
electrovir opened this issue Feb 16, 2023 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@electrovir
Copy link
Owner

Allow this:

<${MyElement.assign({
    inputs: 'blah'
})}><${MyElement}>

instead of this:

<${MyElement}
    ${assign({
        inputs: 'blah'
    })}
><${MyElement}>
@electrovir electrovir added the enhancement New feature or request label Feb 16, 2023
@electrovir electrovir self-assigned this Feb 16, 2023
@electrovir
Copy link
Owner Author

possible way to do this:

  1. add assign method to DelcarativeElementDefinition which returns itself
  2. when assign is called on DelcarativeElementDefinition, it assigns the input values to a new "assigned input" property on the created DelcarativeElementDefinition
  3. assign will have to return a new instance of the DelcarativeElementDefinition so as to not modify the original instance.
  4. The HTML template mapper will then check to see if this "assigned input" property is set, and if it is, it will extract it and modify the mapped template to include a value in the template that is a call to the assign directive..

@electrovir
Copy link
Owner Author

released in v14.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant