gpt4 book ai didi

javascript - 如何在 AngularJS 中跳过 ui-router 的 ui-view 并重定向不带 .html 扩展名的部分 url

转载 作者:行者123 更新时间:2023-11-28 05:26:13 25 4
gpt4 key购买 nike

尝试使用以下内容从主页导航时,它会将我重定向到扩展名为 .html 的页面。

<a href="playplug.html"></a>

/example.com/playplug.html

如何实际跳过在部分模板的 URL 中使用 .html 扩展名,如下所示,使用/不使用 ui-view因为,我想导航到单独的 HTML 页面并且无需在 home_page (example.com) 内显示部分模板

/example.com/playplug

通常,ui-router 的 ui-view 让我在主页中显示部分模板;是否有类似的东西可以覆盖 ui-router 的 ui-view 或任何其他调整...我是 AngularJS 的新手

<a href="playplug.html" url="/playplug"></a>

最佳答案

您所能做的就是输入完整的 URL。这在大多数情况下都有效。

请参阅此处的示例: https://github.com/reflexdemon/ng-gulp/blob/master/src/app/home/home.html#L4

请在此处查看演示: http://demo-venkatvp.rhcloud.com/#/home

关于javascript - 如何在 AngularJS 中跳过 ui-router 的 ui-view 并重定向不带 .html 扩展名的部分 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40151364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com