0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Hello Vue.js 初心者が学んでみた

Last updated at Posted at 2020-11-16
Page 1 of 2

javascript初心者がVueを学んでいく

まず自分のレベルはjavascriptの基礎を覚えたか覚えてないかくらいの初心者なので的外れなことも多々あるかもしれないのでご注意ください。

//html
<body>
//Hello Vue.jsと表示させてみる</h1>
<div id="app">
//普通にかくとこう
<p>Hello Vue.js</p>

  <script>
//vueインスタンスを作る
        new Vue({
//elでhtmlのどこを対象にするかを指定する。
            el:'#app',
//dataには色々なものを定義できる。 ここではHello Vue.jsと表示させたいのでmessage は Hello Vue.js だよーというのを指定
            data:{
                message:'hello Vue.js'
            }

このmessageに入れたのを使うにはhtmlに指定してやる必要がある

```html //{{}}これにさっき作ったmessageを入れてやる

{{message}}

```

こうするとHello Vue.jsと表示することができる

ちなみにこれは v-textという物を使っても表現することができる

```html html //これでも同じくHello vue.jsというのが呼び出せる

```
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?