> For the complete documentation index, see [llms.txt](https://sagar-r-kothari.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sagar-r-kothari.gitbook.io/blog/_posts/2019-05-24-codesnipsforvue.md).

# 2019-05-24-codeSnipsForVue

## For development purpose

```markup
<body>
    ....
    ....
    ....
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</body>
```

## For deployment/distribution purpose

```markup
<body>
    ...
    ...
    ...
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</body>
```

```javascript
var app = new Vue({ // Create Veu
    el: '#app', // using element having 'app' as 'id'
    data: { // data for that element
        product: 'Socks',
        description: 'A pair of warm, fuzzy socks',
        image: './img/vmSocks-green.png',
        inventory: 10,
        onSale: true,
        details: ["80% cotton", "20% polyester", "Gender-neutral"]
    }
})
```
