본문 바로가기

vue

메모장으로 vue 시작하기

1.마우스 오른쪽 클릭 > 새로만들기 > 텍스트 문서 >  aaaaa.html 파일확장자 바꾸기

2.메모장을 열고 aaaaa.html을 드래그하여 메모장위에 올린다. -> 메모장명이 aaaaa.html 이됨

3. https://vuejs.org/guide/quick-start.html#using-vue-from-cdn 의 소스 복사

<div id="app">{{ message }}</div>

<script type="module">
  import { createApp } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'

  createApp({
    data() {
      return {
        message: 'Hello Vue!'
      }
    }
  }).mount('#app')
</script>

4. 메모장 저장 후 aaaaa.html 파일을 더블클릭하여 확인.  message:'Hello Vue! 내용을 변경하여 확인' -끝-