Upon receiving a response from the backend, I am saving it in a variable called "allinfo" in my controller. The data received includes the name, date of birth, and hobby of a person. The hobby is an array that can contain any number of elements.
In my view, I applied an ng-repeat over all the info stored in "allinfo" and for repeating hobbies, I used another ng-repeat to iterate over each hobby in the "info.hobby" array.
The issue I'm encountering is that when I repeat the info in "allinfo" in my view, it displays the name and DOB correctly but doesn't show the hobbies until I refresh the page.
After looking at the console log, I realized that the Hobby object is indeed received in "allinfo," but initially as an empty array. Only after refreshing does the array populate with all the necessary elements.
If anyone has encountered this issue before and knows how to solve it, please help me out. Thank you in advance!