0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

<router-link>の属性を文字列+変数で置く時の記述

0
Last updated at Posted at 2024-02-20

経緯

久しぶりにvueを書いていたら忘れていることが多々・・・。
悲しいですが、初心に返り作業中です。

今回は、エスケープの記述についてになります。
度々失念するのでメモです。

したいこと

ある要素の属性に対し、「文字列+変数」の形式で値を指定したい時

解決策

<router-link :to="`/product/${item.id}`">

私は「`」をよく失念するので注意。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?