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

slots can't be provided normally when component keyword is omitted πŸ› #185

Closed
quimt opened this issue Nov 22, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@quimt
Copy link

quimt commented Nov 22, 2023

To Reproduce πŸ‘¨β€πŸ”¬


component withSlot:
  s: string = $1
  `template`:
   "The number is {self.s}, and the slot is "
   slot

appRoutes("ROOT"):
  "/":
    tDiv:
      component withSlot(): "one"
    tDiv:
      component withSlot($7): "seven"
    tDiv:
      withSlot(): "one"
    #tDiv:
      #withSlot($7): "seven"
    

The commented code unfortunately won't compile.

So omitting the component tag works and allows the same syntax, except in this one case. Which will actually be quite common in practice as components start to do all the things that tags do.

@quimt quimt added the bug Something isn't working label Nov 22, 2023
@Ethosa
Copy link
Contributor

Ethosa commented Nov 23, 2023

Solved in the next commit

Ethosa added a commit that referenced this issue Nov 23, 2023
@Ethosa Ethosa closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants