UNPKG

alpine-turbo-drive-adapter

Version:

Bridge library to enable full support for Alpine components in pages using Turbolinks/Turbo Drive

21 lines (16 loc) 593 B
<html> <head> <script src="https://cdn.jsdelivr.net/npm/@hotwired/turbo/dist/turbo.es2017-umd.min.js"></script> <script src="/dist/alpine-turbo-drive-adapter.js" defer></script> <script src="//unpkg.com/alpinejs" defer></script> </head> <body> <a href="/tests/res/turbo/permanent-for/index.html">go to index</a> <div x-data="{ foo: ['bar', 'baz'] }" id="test" data-turbo-permanent> <template x-for="item in foo"> <span x-text="item"></span> </template> <button x-on:click="foo.push('bob')">click me</button> </div> </body> </html>