I like the vue
Vue.js is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications.
get started
npm init vue@latest
or with yarn
yarn init vue@latest
I love it <3
Q: What is Vue.js?
A: Vue.js is an open-source model–view–viewmodel front end JavaScript
framework for building user interfaces and single-page applications. It was
created by Evan You, and is maintained by him and the rest of the active core
team members.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<div id="dialogs">{/div
<script type="module" src="/src/main.js"></script>
</body>
</html>
<template>
<teleport to="#dialogs">
<div class="the-dialog">
<div class="the-dialog_container">
<div class="the-dialog_header">
{{ heading }}
</div>
Oreferences
<div class="the-dialog_body"><slot></slot></div>
</div>
</div>
</teleport>
</template>
you are a smart person by using this framework
VueJS is a Javascript progressive framework for frontend, it mixes part of React and Angular
// Basic VueJS Example Template
<template>
<div class="myClass" ref>
<slot></slot>
</div>
</template>
<script>
export default {
data() {
return {
myData: "Hello World!"
}
},
mounted() {
this.myMethod();
},
methods: {
myMethod() {
console.log(this.myData);
}
}
}
</script>
<style scoped>
.myClass {
padding: 1em
}
<style>
var app6 = new Vue({
el: '#app-6',
data: {
message: 'Hello Vue!'
}
})
<!-- production version, optimized for size and speed -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<!-- production version, optimized for size and speed -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
var app2 = new Vue({
el: '#app-2',
data: {
message: 'You loaded this page on ' + new Date().toLocaleString()
}
})
return Vue.h('h2', {}, this.blogTitle)
return Vue.h('h1', {}, this.blogTitle)
hi rahim this is test
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/vue.js"></script>
<div id="app-2">
<span v-bind:title="message">
Hover your mouse over me for a few seconds
to see my dynamically bound title!
</span>
</div>
const CounterApp = {
data() {
return {
counter: 0
}
},
mounted() {
setInterval(() => {
this.counter++
}, 1000)
}
}