teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

タイトルの修正、本文の加筆

2017/02/13 16:04

投稿

takumi123
takumi123

スコア59

title CHANGED
@@ -1,1 +1,1 @@
1
- v-forの中でimg v-bing:srcを使いたい。 Vue.js
1
+ v-forの中でimg v-bind:srcを使いたい。 Vue.js
body CHANGED
@@ -8,10 +8,8 @@
8
8
  ネット上の記事を探してみたのですが、v-forの中で使っている例は見つからず困っています。
9
9
  皆さまはforの中でv-bindをどのように使われているのでしょうか?
10
10
 
11
- ##エラー
12
- [Vue warn]: failed to compile template
13
- invalid expression: v-bind:src="{{item.icon}}"
14
11
 
12
+
15
13
  ##コード
16
14
  ```html
17
15
  <div id="message_board">
@@ -33,4 +31,16 @@
33
31
  ]
34
32
  }
35
33
  })
36
- ```
34
+ ```
35
+
36
+
37
+ ##エラー
38
+ [Vue warn]: failed to compile template
39
+ invalid expression: v-bind:src="{{item.icon}}"
40
+
41
+
42
+ ##試したこと
43
+ <img v-bind:src="{{item.icon}}">
44
+ <img v-bind:src={{item.icon}}>
45
+
46
+ 上記2点ともうまくいきませんでした。