Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gastonquiroga opened this issue May 23, 2021 · 1 comment

Comments

@gastonquiroga
Copy link

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
Copy link

tis-h-sato commented Jun 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants