标签: next.js dynamic-routing
在我的nextjs项目中,我正在使用嵌套动态路由,如下所示: document.write()。
document.write()
我尝试像示例nextjs loading example中那样添加加载指示器。
当我尝试从/smth/[route1]/[route2]导航到/smth时,会触发routeChangesStart事件,并且可以通过console.log看到它。
/smth/[route1]/[route2]
/smth
但是当我尝试从/smth/r1导航时,不是。
/smth/r1
我认为这是因为我使用了嵌套的动态路由,但是我不知道如何解决该问题,并且无法更改路由。