개발/개발 자료

(Vue.js) 같은 component 로 push 하기

시원한물냉 2018. 8. 8. 11:40


같은 component로 push하고싶을때가 있다.


예를들면 

입력화면 /수정화면



수정화면에 있다가 입력화면으로 이동하기위해 버튼을 누르지만, 같은 component라서 이동이 안된다 ㅠㅠ



해결방법은 의외로 간단하다

<router-view :key="$route.fullPath"></router-view>





출처 : https://laracasts.com/discuss/channels/vue/vue-2-reload-component-when-same-route-is-requested?page=1