Commit 42230901 authored by Spectre's avatar Spectre 💬

Update

parent b1571010
Pipeline #41 canceled with stages
var app = new Vue({
el: "#app",
data: {
message: "Hello Vue!"
}
});
<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">
<p>{{ message }}</p>
<input v-model="message">
</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.
var app = new Vue({
el: "#app",
data: {
todos: [
{ text: "Belajar JavaScript" },
{ text: "Belajar Vue" },
{ text: "Belajar Hal Baru" }
]
}
});
<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">
<ol>
<li v-for="todo in todos">
{{ todo.text }}
</li>
</ol>
</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.
var app = new Vue({
el: "#app",
data: {
message: "Hello Vue.js!"
},
methods: {
reverseMessage: function() {
this.message = this.message
.split("")
.reverse()
.join("");
}
}
});
<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">
<p>{{ message }}</p>
<button v-on:click="reverseMessage">Klik untuk balik tulisan</button>
</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