Created
December 25, 2023 16:32
-
-
Save hasinhayder/c9851b2c420a7de2a635e664cfc19275 to your computer and use it in GitHub Desktop.
Vue From CDN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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