0👍
Define your templates inside template tags
<template id="SignesConcept">
// Define your template here.
</template>
Then use template attribute instead of el to reference this template from your our component options.
Vue.use(VueRouter)
var SignesConcept = Vue.extend({
template: '#SignesConcept',
data: function() {
return {
show: true
}
}
})
var App = {}
var router = new VueRouter()
router.map({
'/SignesConcept': {
component: SignesConcept
}
})
router.start(App, '#app')
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/0.7.13/vue-router.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.28/vue.js"></script>
<div id="app">
<a v-link="{ path: '/SignesConcept' }">Go to Signes</a>
<router-view></router-view>
</div>
<template id="SignesConcept">
<!-- Signes -->
<div class="row">
<div class="col-md-12">
<div class="box box-success">
<div class="box-header">
<h3 class="font-alt text-left">Signes</h3>
</div>
</div>
</div>
</div>
</template>
Source:stackexchange.com