Last active
March 24, 2017 19:24
-
-
Save colinf/c3ac382959803c242b711e5eae57d650 to your computer and use it in GitHub Desktop.
Vuex component1 ( see http://j.mp/2n2nK6R )
This file contains hidden or 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='Component1'> | |
<form> | |
<div class="form-group"> | |
<label for="inputName">Your name (1)</label> | |
<input v-model="person.name" type="text" class="form-control" id="inputName" placeholder="Name"> | |
</div> | |
<div class="form-group"> | |
<label for="inputProfession">Your profession (1)</label> | |
<input v-model="person.profession" type="text" class="form-control" id="inputProfession" placeholder="Profession"> | |
</div> | |
</form> | |
</div> | |
</template> | |
<script> | |
import { mapState } from 'vuex' | |
export default { | |
computed: { | |
...mapState(['person']) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment