-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.coffee
32 lines (31 loc) · 931 Bytes
/
index.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Vue = require 'vue'
VueRouter = require 'vue-router'
module.exports = (elem)->
Vue.use(VueRouter)
App = Vue.extend
template: """
<div>
<ul>
<li> <a v-link="{path: '/'}">JavaScript</a>
<li> <a v-link="{path: '/hellocoffee'}">Coffee script</a>
<li> <a v-link="{path: '/hellovueify'}">Vueify</a>
<li> <a v-link="{path: '/items'}">Event handling</a>
<li> <a v-link="{path: '/textlist'}">Components</a>
</ul>
<router-view id="content"></router-view>
</div>
"""
router = new VueRouter
router.map
'/':
component: require('./lib/hello_vue')
'/hellocoffee':
component: require('./lib/hello_coffee.coffee')
'/hellovueify':
component: require('./lib/hello_vueify.vue')
'/items':
component: require('./lib/items.coffee')
'/textlist':
component: require('./lib/text_list.vue')
router.start App, elem
router