英文:
Navigation Duplicated in Nuxt.js
问题
NavigationDuplicated: 避免冗余导航到当前位置:"/haendler-details/1404-distilled-gin"
英文:
In my project I have set up a simple nuxt2 with routing but when page refresh it show the error.
NavigationDuplicated: Avoided redundant navigation to current location:
"/haendler-details/1404-distilled-gin"
答案1
得分: 2
这个错误基本上是因为你导航到相同的路由而发生的。
为了避免这个错误,你可以在nuxt-link上使用exact关键字。
<nuxt-link to="/here-the-path" exact>前往蒸馏杜松子酒</nuxt-link>
英文:
This error basically occurs because the you navigate the same route.
So avoid this error you can used exact keyword on nuxt-link
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
<nuxt-link to="/here-the-path" exact>Go to Distilled Gin</nuxt-link>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论