Javascript 转盘重定向到404notFound路由
我的网站目前使用的旋转木马有问题。 我试图找到有同样问题的人,但没有找到 我有一些路径将用户重定向到不同的页面,在主页上,我有一个旋转木马 问题是,当我单击旋转木马的左箭头或右箭头时,它会将我重定向到我用appRoutes定义的404notFound。 我认为这是因为模块试图检查路径(这里是旋转木马的锚点)是否存在于appRoutes中,因为它不存在,所以会将我重定向到我的错误页面 以下是我的路线:Javascript 转盘重定向到404notFound路由,javascript,html,css,angular,web,Javascript,Html,Css,Angular,Web,我的网站目前使用的旋转木马有问题。 我试图找到有同样问题的人,但没有找到 我有一些路径将用户重定向到不同的页面,在主页上,我有一个旋转木马 问题是,当我单击旋转木马的左箭头或右箭头时,它会将我重定向到我用appRoutes定义的404notFound。 我认为这是因为模块试图检查路径(这里是旋转木马的锚点)是否存在于appRoutes中,因为它不存在,所以会将我重定向到我的错误页面 以下是我的路线: const appRoutes: Routes = [ {path: 'home', com
const appRoutes: Routes = [
{path: 'home', component: HomeComponent},
{path: 'customers', component: CustomersComponent},
{path: 'pricing', component: PricingComponent},
{path: 'teaminapp', component: TeaminappComponent},
{path: 'eventapp', component: EventappComponent},
{path: 'species', component: SpeciesComponent},
{path: 'contact', component: ContactComponent},
{path: 'notFound', component: FourohfourComponent},
{path: '**', redirectTo: '/notFound'}
];
我从学校拿的旋转木马:
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="../../../assets/test.jpg" alt="Los Angeles" style="width:100%;">
<div class="carousel-caption">
<h2>Team In'App</h2>
<hr>
<p>Offrez un espace privilégié et interactif à vos équipes, vos membres avec une application personnalisée, flexible et évolutive.</p>
</div>
</div>
<div class="item">
<img src="../../../assets/test2.jpg" alt="Chicago" style="width:100%;">
<div class="carousel-caption">
<h2>Event'App</h2>
<hr>
<p>Dopez vos événements avec une application personnalisée, flexible et évolutive.</p>
</div>
</div>
<div class="item">
<img src="../../../assets/test3.jpg" alt="New york" style="width:100%;">
<div class="carousel-caption">
<h2>Solutions sur mesure</h2>
<hr>
<p>Lorem Ipsum dolor sit amet, consectetur adipisicing elit. Adipisci, autem.</p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
应用程序中的团队
在与私人互动的过程中,你需要运用个人的智慧,灵活多变
活动应用程序
Dopez vosévénements是一个应用型的人,灵活多变
测量溶液
Lorem Ipsum dolor sit amet,奉献精英。阿迪皮西,奥特姆
如果你需要,我准备给你更多的代码
我希望你能帮助我
谢谢 这是因为您正在使用href属性。该属性正在重定向其他页面。那么我应该使用routerLink而不是href吗?所以:你可以使用routerLink,但你的路线中似乎没有我的旋转木马路径谢谢你的回答,我应该在我的路线中写些什么来让我的旋转木马如此工作??因为批准需要一个路径和一个组件,对吗?如果你想使用carousel,你可以使用ngBootstrap,这样就不需要使用jquery了