Skip to content

Instantly share code, notes, and snippets.

@jstoone
Created June 20, 2016 12:55
Show Gist options
  • Save jstoone/595185b8d7e03add0a9f90ddb28c27bd to your computer and use it in GitHub Desktop.
Save jstoone/595185b8d7e03add0a9f90ddb28c27bd to your computer and use it in GitHub Desktop.
Spark + vue-router + vueify = awesome
require('./components/bootstrap');
import SparkWrapper from './lib/spark-wrapper';
import VueRouter from 'vue-router';
import HomeView from './pages/home/index.vue';
Vue.use(VueRouter);
const Router = new VueRouter();
Router.map({
'/': {
component: HomeView
},
});
Router.start(SparkWrapper, 'body');
<template>
<h1>Welcome home</h1>
</template>
<script>
export default {
props: ['user'],
components: [
],
ready() {
console.log("Home View!");
}
}
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment