Commit b1571010 authored by Spectre's avatar Spectre 💬

Update Rendering Tipe Data Lain

parent 35975e08
Pipeline #40 canceled with stages
......@@ -4,7 +4,7 @@ var app = new Vue({
//Script Lainnya diletakkan disini
data: {
message: "Hello Vue!", //variabel
pesan: "Hello Javascript", //variabel
berita: "<b>Hallo</b> <i>Dunia</i>" //variabel
pesan: "Hello Javascript", //variabel
berita: "<b>Hallo</b> <i>Dunia</i>" //variabel
}
});
var app = new Vue({
//object
el: "#app", //element #app
//Script Lainnya diletakkan disini
data: {
text: "Hello Vue!", //variabel
bilangan_bulat: 100, //variabel
bilangan_desimal: 10.3, //variabel
pilihan_benar: true,
pilihan_salah: false,
array: ['satu','dua','tiga']
}
});
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Belajar Vue JS</title>
</head>
<body>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- production version, optimized for size and speed -->
<!--<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
<!--Contoh 1 menggunakan tag <b> langsung-->
<div id="app">
<!--Atribut id-->
<p>contoh text : {{text}} </p>
<p>contoh bilangan bulat : {{ bilangan_bulat }} </p>
<p>contoh bilangan desimal : {{ bilangan_desimal }} </p>
<p>contoh pilihan benar : {{ pilihan_benar }} </p>
<p>contoh pilihan salah : {{ pilihan_salah }} </p>
<p>contoh array : {{ array }} </p>
</div>
<!-- Jika Menggunakan library Javascript vue.js yang terdapat di local-->
<!--<script src="vue.min.js"></script>-->
<!--Memanggil javascript apps-->
<script src="apps.js"></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment