TIL

[TIL] 20211126 vue2 route/ rebase/ vue error

자바칩 프라푸치노 2021. 11. 27. 15:59

1. vue2 에서 route 접근하는 법

vue3에서는 useRoute를 써서  route에 쉽게 접근 할 수 있었는데 

회사 코드는 vue2라서 vue3에서 보지 못했던 $route 를 보게됐다.

root를 쓰지않고 route에 접근하는 법은?

router.app.$route.query.orderType

router을 import 해와서 vue app을 만들때 주입해놓았던 route를 가져온다

 

2. git rebase termal에서 하기

2021.11.27 - [Git] - [Git] github branch rebase 하는 법

 

[Git] github branch rebase 하는 법

 [하는 방법] 리베이스 하고 싶은 브랜치에 체크아웃하고 베이스가 됐으면 좋겠는 브랜치 명을 적는다. git rebase 베이스 브랜치 [rebase란?] 내가 이해한 바로는 베이스가 되는 코드를 바꾸는 것

sso-feeling.tistory.com

 

3. 에러

2021.11.27 - [에러노트] - [에러노트] Avoided redundant navigation to current location: "/goods?nonPublic=0&page=1".

 

[에러노트] Avoided redundant navigation to current location: "/goods?nonPublic=0&page=1".

같은 라우터로 푸시했을때 생기는 오류 this.$router.push("/admin").catch(()=>{}); catch문을 설정해주면 된다! 참고 : stackoverflow How to solve Avoided redundant navigation to current location error in..

sso-feeling.tistory.com

 

728x90