These flash cards are used to learn. Implement this app according to this Demo.
- When the user clicks on Add Question; the flash card shows up
- BONUS: In the demo there is a slight fade in animation you can implement.
- When the user clicks on the 'X'; the flash card is hidden.
- Implement the add card funcionality. Both input controls must have some values. If any them are empty, show an error message like in the demo. Take into account that the data is submitted via a form.
- Remember the correct place to set the submit event!
- Start by simple showing the error message if any of the input values are empty. Please notice that the error message is already located in the HTML
- You will need some variables in order to control which messages/elements must be displayed or hidden.
- Show all the flash cards at the bottom of the page. BONUS: The last flash added should be the first one to be displayed. HINT: You don't really need to sort the array; but use the right array method to add the new element in sthep 3.
- Implement the 'DELETE' functionality. Remember that there are two ways to manage this requeriment:
// Pass the generated flashcard id as a parameter
@click="removeCard(flashcard.id)"
// Pass all the flashcard object
@click="removeCard(flashcard)"
- Implement the 'EDIT' funcionality. You can use the same 'ADD QUESTION' form, but you'll need to control wheter you are in edit mode or just addiding a new question
- BONUS: Save all your generated cards in the localStorage object, so you can retrieve them whenever you come back to the app. A good place to load (if there is any) local storage data; is in the mounted hook