Created
June 5, 2021 10:08
-
-
Save isaacssemugenyi/6f01067b54478443a7d72d93291df13e to your computer and use it in GitHub Desktop.
template section of the vue component with a basic form and data-binding with v-model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="row"> | |
<div class="offset-md-3 col-md-6 mt-5"> | |
<h3>Article Form</h3> | |
<form action="#" @submit.prevent="submitData"> | |
<div class="form-group"> | |
<input | |
type="text" | |
class="form-control" | |
placeholder="Title" | |
v-model="article.title" | |
/> | |
</div> | |
<div class="form-group"> | |
<textarea | |
type="text" | |
class="form-control" | |
placeholder="description" | |
v-model="article.description" | |
></textarea> | |
</div> | |
<div class="form-group"> | |
<input | |
type="submit" | |
class="btn btn-primary btn-block" | |
value="submit" | |
/> | |
</div> | |
</form> | |
</div> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment