-2

I am using vuejs cdn in my laravel blade file. Now, I want to bind v-model on my html input fields like text and select tag. here is my code how i am trying to use v-model on select tag. This process isn't working for me. thanks in advance

@section('script')
    <script>
        var app = new Vue({
            el: '#purchaseApp',
            data() {
                return {
                   purchase_items:'',
                   supplier:'',
                }
            },
            methods: {

            },
        });
    </script>
@endsection
<div class="widget-content widget-content-area">
    <div class="form-group row">
        <label for="category" class="col-sm-2 col-form-label">Supplier</label>
        <div class="col-sm-10">
            <select name="supplier" v-model="supplier" class="form-control suppliers" >
                <option value="" selected disabled>Select Supplier</option>
                 <option value="shibbir">shibbir</option>
                 <option value="ripon">ripon</option>
            </select>
        </div>
    </div>
matiaslauriti
  • 7,065
  • 4
  • 31
  • 43

1 Answers1

0

I have got the solution of problem. There I used select-2 plugin. For that reason, v-model wasn't working.

E_net4
  • 27,810
  • 13
  • 101
  • 139