I have a Laravel Blade template which has an AlpineJS div defined like this:
<div x-data="{ id: 2 }">
...
<button type="button" wire:click="deleteAddress(id)">Button</button>
</div>
What I want is somehow "pass" that id
variable to the wire:click call.
The above code throws an Uncaught ReferenceError: id is not defined
in my JS console.
Any ideas? Just starting with the TALL stack and I do not know the optimal workflows yet.
Thanks in advance.
@entangle
, linking a property within the component to the AlpineJS code. – andcl