-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathdemo.html
37 lines (35 loc) · 1.04 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Range</title>
<link rel="stylesheet" href="../../../common.css" />
<script src="../../../common.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core@7/dist/ionic/ionic.esm.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core@7/css/ionic.bundle.css" />
<style>
.demo {
max-width: 320px;
width: 100%;
}
</style>
</head>
<body>
<ion-app>
<ion-content>
<div class="container">
<div class="demo">
<ion-range aria-label="Range with ionChange"></ion-range>
</div>
</div>
</ion-content>
</ion-app>
<script>
const range = document.querySelector('ion-range');
range.addEventListener('ionChange', ({ detail }) => {
console.log('ionChange emitted value:', detail.value);
});
</script>
</body>
</html>