0 minutes, 24 seconds

Alpine Test XMODELABLE

x-modelable allows you to expose any Alpine property as the target of the x-model directive.

As you can see the outer scope property "number" is now bound to the inner scope property "count".

Typically, this feature would be used in conjunction with a backend templating framework like Laravel Blade.

It's useful for abstracting away Alpine components into backend templates and exposing state to the outside through x-model as if it were a native input.

Number:

Previous Next