Greetings all and pardon my novice as I am new to coding,
I have been attempting to make a CRUD application using VUEJS MYSQL SASS+HTML
I cannot seem to figure out how to properly grab data from mysql to display on my edit page of my web application. I used express js, handlebars, mysql, and node for my previous project.
I tried copying this html code from my previous project, but as I figured, I am not able to transfer the data from the api to the table and vice versa. I am not using handlebars for this project, but I copied the table from my handlebars section. If any advice could be spared, it would be greatly appreciated. Usually you call the data in name with {{this.something }}, but that does not grab my data from my table.
</div>
<div class="col-5">
<label for="contact_name">Contact Name</label>
<input
type="text"
class="form-control"
value=""
placeholder=""
name="contact_name"
/>
</div>
<div class="col-5">
<label for="reason">Reason</label>
<input
type="text"
class="form-control"
value=""
placeholder=""
name="reason"
/>
</div>
<div class="col-12 d-grid">
<button class="btn btn-primary" type="submit">Submit</button>
</div>
</template>
<script>
export default {
computed: {
id() {
return this.$route.params.id;
},
serviceEntry() {
let tmpEntry = null;
for (let element of this.$store.state.serviceEntries) {
if (element.id == this.id) {
tmpEntry = element;
break;
}
}
return tmpEntry;
},
},
};
</script>