Code-Pop / Intro-to-Vue-3

Code for Vue Mastery's Intro to Vue 3 course:
https://www.vuemastery.com/
780 stars 3.2k forks source link

L4-end is missing the usage of inventory and onSale data properties. #55

Open gastonquiroga opened 3 years ago

gastonquiroga commented 3 years ago

During lesson 4 an inventory property is added and used on the html to show if the product has stock. The challenge asks to add an onSale boolean property to show an "On Sale!" message. On L4-end branch, both properties are inside the data element but they're not being used inside the html.

tis-h-sato commented 3 years ago

The solution on CodePen looks correct.

index.html in L4-end branch need to write following codes. (Quoted solution index.html on CodePen)

~ abbrev. ~
            <p v-if="inventory > 10">In Stock</p>
            <p v-else-if="inventory <= 10 && inventory > 0">Almost sold out!</p>
            <p v-else>Out of Stock</p>
            <!-- solution -->
            <p v-if="onSale">On Sale!</p>
            <!-- solution -->
~ abbrev. ~

P.S. I missed the PR #54