A Pen by Vue Mastery on CodePen.
Created
March 13, 2020 03:03
-
-
Save shixudongleo/91827478a587abb30e3a3b1fb8dbf564 to your computer and use it in GitHub Desktop.
Challenge 1 - Intro to Vue
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="app"> | |
<div class="product-image"> | |
<img src="" /> | |
</div> | |
<div class="product-info"> | |
<h1>{{ product }}</h1> | |
</div> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"></script> |
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
//Add a description to the data object with the value "A pair of warm, fuzzy socks". Then display the description using an expression in an p element, underneath the h1. | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
product: 'Socks' | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment