I have a question regarding the Vue lifecycle hooks. I have some method that I want to call first in a hook, but another method is calling before.
The desired method is loadData()
that calls from beforeMount
. This method is responsible for API requests. But, it calls after the method getIndex
.
The method that calls first is getIndex
and I want it to call last:
myFile.vue
<b-form>
<app-select
labelName="Name"
fieldType="Type"
:val="getIndex('M','Q',null,null)">
</app-select>
</b-form>
I tried to call loadData()
from mounted()
, beforeMounted()
but each time it is the second one. Does anyone know the answer? Thanks