I am tring to populate a html select field with numbers 1 to 100 using Vuejs. I have tried:
<div id="selector">
<select id='row_selector' class="form-control" v-model="intArray"></select>
</div>
<script type="text/javascript" src="path_to/vue.js"></script>
<script>
const MAX_VAL = 100;
var numArray = Array.apply(null, {length: numArray}).map(Number.call, Number)
var app = new Vue({
el: '#selector',
data: {
"intArray": numArray
}
})
But the select element is empty. Do I need to use a directive to populate it?