티스토리 뷰
외부 js 파일에서 Vue앱의 route 접근하고 할때!
먼저 router를 import 한다.
import router from '@/router'
여기서
router.options.routes 으로 route 정보를 확인 할 수 있다.
혹은
router.currentRoute 로 현재 경로 정보를 확인 할수 있다.
이 간단한걸 몰라서 여태껏 고생했다...
'프론트엔드 > Vue.js' 카테고리의 다른 글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- three.js leva
- leva
- vue react
- react 3d text
- 394 decode string
- vue
- 394. decode string js
- attempted import error: bvh_struct_definitions' is not exported from './gpu/bvhshaderglsl.js' (imported as 'bvhshaderglsl').
- react 3d animation
- react leva
- [leetcode] 394. decode string
- react vue
- ts glsl
- typescript gsls
- react three fiber leva
- react glsl
- react three fiber
- next.js import glsl
- vue ref
- react ref reative
- webpack glsl
- [leetcode] 394. decode string js
- react 3d
- eslint
- Vue.js
- vue3
- react fiber 3d
- 394. decode string javascript
- vue reactive
- react 3d 에니메이션
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함