私はvuejsでwokringしています。何らかの理由で別のルートに切り替わったときにコンテンツが表示されません。私は、次のコードを持っている: App.vueに - 私のroutes.js中>ルータにはコンテンツが表示されません。VueJS
<template>
<div>
<router-view> </router-view>
</div>
</template>
- >私のSupport.vueで
import Support from './components/support/Support.vue';
import Detailed from './components/support/details/Detailed.vue';
export const routes =[
{path: '/support', component: Support, children: [
{path: 'detailed', component: Detailed, name: 'detailed'}
]},
];
私が持っているコンポーネント - >
<div class="row">
<component :is = "selectedComponent"> </component>
</div>
を選択し、そのコンポーネントを選択すると特定のコンテンツが表示されます。このコンテンツの内部で私が持っている - >
<div class="most-asked">
<ul>
<router-link :to ="{name: 'detailed'}" tag = 'li'> Test </router-link>
</ul>
私はそれがへ=>「/サポート/詳細」私のブラウザでURLを変更しますが、それはそのページに私をリダイレクトするdoesntのことで押し
。 なぜそれが起こり、それを修正する方法に関するアイデアですか?PS私はルートがroutes.jsで区切る作る場合のように - >それは私が完全に罰金リダイレクトが、私はサポートの子を作ると、それはもうそこ
PSSとで行くのdoesnt /詳細かつ/サポートそれは私が、私は、ブートストラップおよびなどが含まれている場合、そのまたそれらのルートでそれを見つけるつもりはないと仮定してい (Failed to load resource: http://localhost:8080/support/src/vendors/css/grid.css Failed to the server responded with a status of 404 (Not Found)
とhttp://localhost:8080/support/src/vendors/css/ionicons.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
のようなファイルをロードするために、そのできないというのが私のブラウザで、時々私に語ったいくつかの理由(なぜ?)、しかし、すべてのルートをc彼らはうまく働いています。
子ルートの '/ detailed'へのパスを変更します。 –
私は以前に試しました。ブラウザのURLで/ detailedに変更されますが、/ supportの同じページにとどまります – Stan