0👍
I am unable to make comments, and therefore would only give my suggestions here. First of, due to client or user mistrust, I bet you are using some kind of backend api for the marking. That is, you send api request each time the submit button is clicked. So now here is where you would integrate with what you are trying to achieve, upon hitting the backend, the json response will have the questions plus the correctly selected answers and now in your loop you can show the div’s ( correct and incorrect ) based on the correctness of the answer provided.
Steps:
- Show the questions
- Mark the questions (backend)
- Show the questions now with answer status (wrong or correct)
- Show the correct or error block based on the answer status
- [Vuejs]-Vue: how do I pass down data from my parent component to required child components?
- [Vuejs]-Uncaught Error Attempting to use a disconnected port object in Vue CLI App?
Source:stackexchange.com