modified code
This commit is contained in:
12
index.html
12
index.html
@@ -4,7 +4,6 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Riot App</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script type="javascript" src="model.js"></script>
|
||||
</head>
|
||||
<body class="bg-neutral-50">
|
||||
|
||||
@@ -17,8 +16,17 @@
|
||||
<script type="javascript" src="./onzer.riot"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
async function fetch_data(){
|
||||
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/albums").then(response => {
|
||||
return response.json();
|
||||
} )
|
||||
}
|
||||
|
||||
riot.compile().then(() => {
|
||||
riot.mount('onzer');
|
||||
riot.mount('onzer', {
|
||||
items : await fetch_data()
|
||||
}
|
||||
);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user