-
-
Save kevinnio/5fd6c1e9a7424ba755770d55f8e0d0aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="stock-app"> | |
<h3>Inventory</h3> | |
<ul> | |
<li v-for="product in products">{{ product.name }}: {{ product.amount }}</li> | |
</ul> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/vue"></script> | |
<script> | |
new Vue({ | |
el: '#stock-app', | |
data: { | |
products: [ | |
{ name: 'Apples', amount: 10 }, | |
{ name: 'Oranges', amount: 50 }, | |
{ name: 'Bananas', amount: 39 }, | |
{ name: 'Pears', amount: 4 }, | |
] | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment