1π
Is something in my loop?
Yes: You never change this.id
in the loop. That loop just creates HTTP request after HTTP request after HTTP request, because your increment of this.id
is inside your then
callback, which is asynchronous.
Move the increment outside of the then
callback so the loop actually finishes.
Re your edit replacing while (this.id <= 10)
with while (this.found)
, itβs the same sort of problem: Nothing ever sets this.found
.
π€T.J. Crowder
- [Vuejs]-How to add item from select dropdown β keen-ui
- [Vuejs]-How to extract Route Params via Props
Source:stackexchange.com