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

回答編集履歴

2

this の問題を修正

2018/06/11 16:00

投稿

yhg
yhg

スコア2161

answer CHANGED
@@ -45,9 +45,9 @@
45
45
  created: function () {
46
46
  fetch('/imageList/kyoto').then(function (response) {
47
47
  return response.json();
48
- }).then(function (json) {
48
+ }).then((function (json) {
49
49
  this.imageList = json.fileList;
50
- });
50
+ }).bind(this));
51
51
  }
52
52
  })
53
53
  ```

1

コード内に余計なスペースがあったので削除

2018/06/11 16:00

投稿

yhg
yhg

スコア2161

answer CHANGED
@@ -4,7 +4,7 @@
4
4
  ```html
5
5
  <image-component
6
6
  v-for="(elm, index) in imageList"
7
- v-bind:elm = "elm"
7
+ v-bind:elm="elm"
8
8
  v-bind:key="index">
9
9
  </image-component>
10
10
  ```