Last active
April 25, 2018 16:38
-
-
Save jrast/f09134a9dc5ecf1610c433c1cf4705a8 to your computer and use it in GitHub Desktop.
Vuetify - Buttons and VueRouter
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
const Foo = { template: '<div>foo</div>' } | |
const routes = [ | |
{ path: '/foo', component: Foo }, | |
] | |
const router = new VueRouter({ | |
routes // short for `routes: routes` | |
}) | |
new Vue({ | |
el: '#app', | |
router, | |
data: { | |
canSave: false, | |
} | |
}) |
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
<div id="app"> | |
<v-app id="inspire"> | |
<v-btn :disabled="!canSave" to="/foo">Save (should be disabled)</v-btn> | |
<v-btn :disabled="canSave" to="/foo">Save (should be enabled)</v-btn> | |
</v-app> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the VueRouter to the Project: https://unpkg.com/vue-router/dist/vue-router.js