Skip to content

Instantly share code, notes, and snippets.

@jrast
Last active April 25, 2018 16:38
Show Gist options
  • Save jrast/f09134a9dc5ecf1610c433c1cf4705a8 to your computer and use it in GitHub Desktop.
Save jrast/f09134a9dc5ecf1610c433c1cf4705a8 to your computer and use it in GitHub Desktop.
Vuetify - Buttons and VueRouter
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,
}
})
<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>
@jrast
Copy link
Author

jrast commented Jul 11, 2017

Add the VueRouter to the Project: https://unpkg.com/vue-router/dist/vue-router.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment