Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Tags
- js
- 싸피10기
- react
- 알고리즘
- 싸피셜
- Django
- 백준
- 싸피
- 14658
- 플로이드워셜
- VITE
- unionfind
- git
- Javascript
- 셀프넘버
- QuerySetAPI
- TypeScript
- SSAFY
- 리액트
- Python
- 머신러닝종류
- queryset
- sqld
- SSAFYcial
- PWA
- db
- vitepwa
- SQL
- 데코레이터
- pwa적용하기
Archives
- Today
- Total
Meme's IT
[Vue] Axios 본문
npm install axios
view파일에서
import {ref} from 'vue'
import axios from 'axios'
const products = ref([])
const storeURL = 'https://fakestoreapi.com/products'
axios.get(storeURL)
.then((response) => {
console.log(response)
products.value = response.data
}).catch ((error) => {
console.error(error)
})
이런식으로 출력하면 데이터 확인 가능
# params와 query의 차이점?
'FrontEnd > Vue' 카테고리의 다른 글
[Vue] Pinia의 구성 요소 (0) | 2023.11.13 |
---|---|
[Vue] State Management (0) | 2023.11.13 |
[Vue] Router(3) Navigation Guard (0) | 2023.11.09 |
[Vue] Router(2) 프로그래밍 방식 네비게이션 (0) | 2023.11.09 |
[Vue] Router(1) 기본, 동적 Routing (0) | 2023.11.09 |