Skip to content
Advertisement

v-for vueJS condition v-if

I have a problem with v-for with v-if en my component VUEJS

I need that if i have one promotion active show it in my div but if i haven´t got any promotion active show button for buy a promotion.

I have do all my condition, but always show that i don´t have promotion active, but in console, no, in web browser console, i can show my aray with promotion.

I attached my actual code.

i have got to say that all my code is in laravel.

Route:

JavaScript

Controller:

JavaScript

component vueJS

JavaScript

web browser console

JavaScript

Advertisement

Answer

Probably you should change your code in this way to achieve it:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement