mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Create app.js
This commit is contained in:
parent
3c1b32746d
commit
0a85e5a6dd
1 changed files with 20 additions and 0 deletions
20
.gh-pages/app.js
Normal file
20
.gh-pages/app.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('list', () => ({
|
||||
isLoading: true,
|
||||
query: '',
|
||||
_query: '',
|
||||
items: [],
|
||||
|
||||
search() {
|
||||
this._query = this.query.toLowerCase()
|
||||
},
|
||||
|
||||
async init() {
|
||||
this.items = await fetch('_items.json')
|
||||
.then(response => response.json())
|
||||
.catch(console.log)
|
||||
|
||||
this.isLoading = false
|
||||
}
|
||||
}))
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue