Merge pull request #14 from AnBusse/make-vue-sample-code-clearer

pull/313/head
Jen Looper 4 years ago committed by GitHub
commit ce49aea134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -410,7 +410,7 @@ You can see an empty card with a 'Delete' button right after the current dog vie
To render a list of items based on an array Vue has a `v-for` directive, which will iterate through this array and render each item. Let's add this directive to our opening `v-flex` element that will show the array of favorite cards in the new container you just added: To render a list of items based on an array Vue has a `v-for` directive, which will iterate through this array and render each item. Let's add this directive to our opening `v-flex` element that will show the array of favorite cards in the new container you just added:
```html ```html
<v-flex xs6 sm4 md2 v-for="(pet, index) in favoriteDogs" :key="pet"></v-flex> <v-flex xs6 sm4 md2 v-for="(pet, index) in favoriteDogs" :key="pet">
``` ```
Here `pet` is the reference to the _current array element_ and `index` is the _index of this element_ inside the array. Here `pet` is the reference to the _current array element_ and `index` is the _index of this element_ inside the array.

Loading…
Cancel
Save