Skip to content

Instantly share code, notes, and snippets.

@hasinhayder
Created December 25, 2023 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasinhayder/c9851b2c420a7de2a635e664cfc19275 to your computer and use it in GitHub Desktop.
Save hasinhayder/c9851b2c420a7de2a635e664cfc19275 to your computer and use it in GitHub Desktop.
Vue From CDN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue From CDN</title>
<script src="//unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
{{ message }}
<h2>{{ sayHello() }} </h2>
</div>
</body>
<script>
const { createApp } = Vue;
const app = createApp({
setup() {
function sayHello(){
return('Hello To Our Vue.js Course');
}
return {
sayHello,
message: 'Hello World 123'
}
}
}).mount('#app')
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue From CDN</title>
<script src="//unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
{{ message }}
<h2>{{ sayHello() }} </h2>
</div>
</body>
<script>
const { createApp } = Vue;
const app = createApp({
methods:{
sayHello(){
return('Hello To Our Vue.js Course');
}
},
data() {
return {
message: 'Hello World 123'
}
}
}).mount('#app')
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment