Skip to content
Discussion options

You must be logged in to vote

Hey!

Yeah, one can't really refer to element attributes from data expressions, so it won't work like this. Also, you'll have to use the data-binding attribute, which would be e.g. data-event-click="my_click_function()".

You have some options. You can define a data alias and refer to that in the template. That way you can make it re-usable. But this way you can only refer to data-variables that are defined elsewhere, you can't really define it directly in the parent.

Another option is to make a data event callback. That way you can handle the event manually, and read the attribute from the current element, and make your action based on what's given in your "clickFunction" attribute. See an…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@mikke89
Comment options

@mupersega
Comment options

@mikke89
Comment options

@mikke89
Comment options

@mupersega
Comment options

Answer selected by mupersega
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants