-
Hi, First of all, I want to say that I really like AlpineJS! Great job! Now, I have a scenario for which I couldn't make Alpine work: I'm loading some html content with AJAX calls (say a modal with a form) and would like to be able to have this modal and it's content use the Alpine logic - eg. handle the close button click, sync data between different form fields, handle some validations etc. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Do you have a sample of it not working? Alpine watches the DOM for changes and initialises any new Alpine components, so it should work out of the box if you're inserting the HTML into the DOM. It should also work to use |
Beta Was this translation helpful? Give feedback.
Do you have a sample of it not working?
Alpine watches the DOM for changes and initialises any new Alpine components, so it should work out of the box if you're inserting the HTML into the DOM.
It should also work to use
x-html
to inject your markup.