gpt4 book ai didi

javascript - Chrome 在 anchor 标记中创建页面内链接的问题

转载 作者:行者123 更新时间:2023-12-03 04:35:25 25 4
gpt4 key购买 nike

我遇到了一个我从未遇到过的独特问题。就我而言,当我在 URL chrome 中使用 "#filterPop" 时,会在/之后附加额外的斜杠,例如:"#/filterpop"

有人可以建议如何消除这种行为吗?

PS:我正在使用 Angular JS,但我没有使用任何路由。

谢谢。

最佳答案

设置 html 模式如app.js(主js)文件中的$locationProvider.html5Mode(true);并在html文件中设置基本标签

<base href='/'>

关于javascript - Chrome 在 anchor 标记中创建页面内链接的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43320802/

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