回答編集履歴
1
書式の改善
test
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
相対パスではなくルートパスではどうでしょうか。
|
2
2
|
|
3
|
-
`
|
3
|
+
```lang=javascript
|
4
4
|
|
5
|
+
var getColorURL = "/assets/js/color.json"
|
6
|
+
|
7
|
+
|
8
|
+
|
5
|
-
|
9
|
+
axios.get(getColorURL)
|
10
|
+
|
11
|
+
.then(function (response) {
|
12
|
+
|
13
|
+
console.log(response.data)
|
14
|
+
|
15
|
+
}).catch(function (error) {
|
16
|
+
|
17
|
+
alert(error)
|
18
|
+
|
19
|
+
})
|
20
|
+
|
21
|
+
```
|