VueJs | Laravel | Vuejs Function not working inside a loop
i have an Error :
You may have an infinite update loop in a component render function.
This function :
getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},
Is not working inside this loop function:
getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}
In blade :
<tr v-for="invoicesnv in invoicesnvs">
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>
Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.
laravel
add a comment |
i have an Error :
You may have an infinite update loop in a component render function.
This function :
getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},
Is not working inside this loop function:
getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}
In blade :
<tr v-for="invoicesnv in invoicesnvs">
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>
Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.
laravel
Where isgetRinvoicesnv()called? This doesn't seem to be your full code.
– Namoshek
Nov 25 '18 at 17:45
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53
add a comment |
i have an Error :
You may have an infinite update loop in a component render function.
This function :
getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},
Is not working inside this loop function:
getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}
In blade :
<tr v-for="invoicesnv in invoicesnvs">
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>
Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.
laravel
i have an Error :
You may have an infinite update loop in a component render function.
This function :
getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},
Is not working inside this loop function:
getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}
In blade :
<tr v-for="invoicesnv in invoicesnvs">
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>
Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.
laravel
laravel
edited Nov 25 '18 at 17:48
yassine j
asked Nov 25 '18 at 17:37
yassine jyassine j
848
848
Where isgetRinvoicesnv()called? This doesn't seem to be your full code.
– Namoshek
Nov 25 '18 at 17:45
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53
add a comment |
Where isgetRinvoicesnv()called? This doesn't seem to be your full code.
– Namoshek
Nov 25 '18 at 17:45
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53
Where is
getRinvoicesnv() called? This doesn't seem to be your full code.– Namoshek
Nov 25 '18 at 17:45
Where is
getRinvoicesnv() called? This doesn't seem to be your full code.– Namoshek
Nov 25 '18 at 17:45
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470128%2fvuejs-laravel-vuejs-function-not-working-inside-a-loop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470128%2fvuejs-laravel-vuejs-function-not-working-inside-a-loop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Where is
getRinvoicesnv()called? This doesn't seem to be your full code.– Namoshek
Nov 25 '18 at 17:45
Thank you for ur interest, i eddited post for you
– yassine j
Nov 25 '18 at 17:48
This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?
– Namoshek
Nov 25 '18 at 17:50
I have a computed to calcule total yes and other get /post functions
– yassine j
Nov 25 '18 at 17:53