[英]dynamique nuxt-link with strapi
I think I understand that strapi + the nuxt-link tag allows you to make dynamically link to another view without methods.我想我明白了 Strapi + nuxt-link 标签允许您在没有方法的情况下动态链接到另一个视图。
I need a link for a vue with the id in parameter to received the good data on the url of strapi.我需要一个带有参数 id 的 vue 链接,以接收关于 Strapi url 的好数据。
Actually i try that:其实我试过:
<li v-for="app in applications" :key="app.id">
<nuxt-link to=`/applications/${app.id}`>
{{ app.name }}
</nuxt-link>
</li>
But my syntaxe is not correct, i have this error:但是我的语法不正确,我有这个错误:
ERROR in ./components/TheSidebar.vue
6:23 error Parsing error: unexpected-character-in-unquoted-attribute-value vue/no-parsing-error
6:23 warning Expected to be enclosed by double quotes vue/html-quotes
6:24 error Parsing error: unexpected-character-in-unquoted-attribute-value vue/no-parsing-error
6:38 error Parsing error: unexpected-character-in-unquoted-attribute-value vue/no-parsing-error
How can i make this dynamique link please?我怎样才能制作这个动态链接?
This should work, tags should not be opened/closed with ``, but always with double quotes ("")这应该有效,标签不应该用``打开/关闭,而总是用双引号(“”)
<li v-for="app in applications" :key="app.id">
<nuxt-link :to="'/applications/' + app.id">
{{ app.name }}
</nuxt-link>
</li>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.