Difference between revisions of "User.vue"
Jump to navigation
Jump to search
(Created page with "<pre> <template> <div id="app"> <h1>User Page</h1> <button @click="navigateToHome" class="mybutton"> Go to Home</button> <hr> <router-view></router-view> </div> <...") |
(No difference)
|
Revision as of 23:27, 17 October 2018
<template>
<div id="app">
<h1>User Page</h1>
<button @click="navigateToHome" class="mybutton"> Go to Home</button>
<hr>
<router-view></router-view>
</div>
</template>
<script>
export default {
methods: {
navigateToHome(){
// adds the link to the stack so you can hit the back button
this.$router.push('/')
}
}
}
</script>
<style>
.mybutton{
padding: 10px;
background-color:azure;
color:brown;
}
</style>