As I develop a simple examination application using Angular for the frontend, I have been struggling with a particular issue for the past two days. The problem revolves around making a POST request where the data to be posted comes from iterated data in my view (specifically, question.id and tempanswer through ng-repeat directive). While I know how to make single requests, this specific scenario has me stumped.
Take a look at the code snippet below:
Backend:
(Code snippet provided for backend)
Angular (frontend):
(Code snippet provided for Angular/frontend)
View (HTML):
(Code snippet provided for HTML/view)
I have tested my API using Postman and it works correctly with the specified format. However, when used in my backend, the tempAnswer returns null. I suspect the issue lies within my Angular setup. Any suggestions or solutions would be greatly appreciated. Since I am new to Angular, I'm eager to learn and improve.