Calling Named Actions from HTML Vue Events
There are many times you want to trigger an action script from an event within a block of HTML code.
Vue makes it easy to attach events onto HTML elements.
You can do direct mutations to the model
:
model
:You can run action scripts on events too:
Advanced:
Some Vue components expect a pure function to be passed into the event handler key. For this situation, you cannot use the namedAction
function directly, but instead just wrap it as follows:
Last updated