0

次のindex.htmlがあります

<html>

....
<section id="#section">
<router-view></router-view>
</section>
</html>

テンプレートファイルには、「/」にロードされている次のものがあります

<div>
    <a v-on:click="go()">GO</a>
</div>
<script>
    export default {
        methods: {
            go: function () {
                this.$router.go("/app")
            }
        }
    }
</script>

そして、私は次のルートマップを持っています

route.map({
    '/': {component: a},
    "/app": {component:b}
})
route.start(a,"#section")

リンクをクリックしても表示が変わらないようです。何が間違っているのかわかりません。

使っても

 route.map({'/': {component: a, subRoutes: { '/app': component: b }}}

うまくいかないようです。

4

1 に答える 1