screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous"> </head> <body> <div id='app' class="container-fluid text-center"> <h2 class='mb-2 text-success'>Vue js Array Iterator item with index-value pairs</h2> <p>Device : {{devices}}</p> <p></p> <p v-for="(device,index) in devices" v-bind:key = "index">{{index}} {{device}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return { devices :['desktop','laptop','tablet','mobile'], } }, }).mount('#app') </script> </body> </html>