Last active
April 20, 2017 18:16
-
-
Save thulioph/ddba7f4e5c5094ef8fbe982e1ba132a2 to your computer and use it in GitHub Desktop.
Post about the Vuejs.
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> | |
| <button @click="toggle"> | |
| Change Status | |
| </button> | |
| <p>{{ active }}</p> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'Toggle button', | |
| data() { | |
| return { | |
| active: false | |
| }; | |
| }, | |
| methods: { | |
| toggle() { | |
| this.active = !this.active; | |
| } | |
| } | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment