【发布时间】:2021-01-01 05:10:21
【问题描述】:
我想我明白strapi + nuxt-link 标签可以让你在没有方法的情况下动态链接到另一个视图。
我需要一个带有 id 参数的 vue 链接,以接收strapi url 上的良好数据。
其实我试试看:
<li v-for="app in applications" :key="app.id">
<nuxt-link to=`/applications/${app.id}`>
{{ app.name }}
</nuxt-link>
</li>
但是我的语法不正确,我有这个错误:
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
请问我如何制作这个动态链接?
【问题讨论】:
标签: javascript vue.js nuxt.js strapi