-3
How to create a string array using line break as separator value.split("\n")
?
Ex:
<textarea placeholder="LISTA" type="text"> </textarea>
And how can I send a request using Axios for each line break using a foreach?
Failed attempt:
<div id="app">
<div v-for="item in list" :key="item.id">
<b-form-textarea v-model="item.value"></b-form-textarea>
<br/>
</div>
</div>
<script>
new Vue({
return this.list.map(e => {
return axios.get('http://localhost/fg/nova.php?lista='+e.value.split("\n"))
.then(function (response) {
// handle success
console.log(response);
})
});
})
</script>
split and a for/foreach does not result, so make the ajax call inside the loop
– Ricardo Pontual
Wagner, I believe your question is not about you, try to create lean examples without what is not part of the problem, it helps who wants to help you, okay?
– Edson Vicente Carli Junior