samedi 4 février 2017

how to use optgroup with v-for?

This is my function in vue that i call in ready:

 getDistricts:function(){

                this.$http.get('/profile/property/getDistricts').then(function(response){
                    // True
                    this.districts = response.data.districts;

                }, function(response){
                    // False
                }.bind(this));
            },

When i try to use v-for with optgroup like this i dont get anything:

  <optgroup v-for="district in districts" label="@">

But when i put something like this outside select i get values:

<div v-for="district in districts">
       @
  </div>

Any suggestion how can i loop optgroup?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l4Y5gC
via IFTTT

Aucun commentaire:

Enregistrer un commentaire