๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

Vue.js15

Nested Router Nested Router(๋„ค์Šคํ‹ฐ๋“œ ๋ผ์šฐํ„ฐ)๋Š” ๋ผ์šฐํ„ฐ๋กœ ํŽ˜์ด์ง€๋ฅผ ์ด๋™ํ•  ๋•Œ ์ตœ์†Œ 2๊ฐœ ์ด์ƒ์˜ ์ปดํฌ๋„ŒํŠธ๋ฅผ ํ™”๋ฉด์— ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋‹ค. ๋„ค์Šคํ‹ฐ๋“œ ๋ผ์šฐํ„ฐ๋ฅผ ์ด์šฉํ•˜๋ฉด URL์— ๋”ฐ๋ผ์„œ ์ปดํฌ๋„ŒํŠธ์˜ ํ•˜์œ„ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ๋‹ค๋ฅด๊ฒŒ ํ‘œ์‹œ๋œ๋‹ค. 2022. 6. 6.
[Vue.js] router URL์˜ ํ•ด์‹œ ๊ฐ’(#)์„ ์—†์• ๋Š” ๋ฒ• vue router์˜ ๊ธฐ๋ณธ URL ํ˜•์‹์€ ํ•ด์‹œ ๊ฐ’(#)์„ ์‚ฌ์šฉํ•œ๋‹ค. ๋งŒ์•ฝ index.html/login๊ณผ ๊ฐ™์ด ํ•ด์‹œ ๊ฐ’์„ ์—†์• ๊ณ  ์‹ถ์œผ๋ฉด ํžˆ์Šคํ† ๋ฆฌ ๋ชจ๋“œ(history mode)๋ฅผ ํ™œ์šฉํ•˜๋ฉด ๋œ๋‹ค. var router = new VueRouter({ mode: 'history', routes }) 2022. 6. 6.
[Vue.js] v-model v-model์€ ์–‘๋ฐฉํ–ฅ ๋ฐ”์ธ๋”ฉ์„ ํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค. 2021. 12. 28.
[Vue.js] v-on v-on์€ DOM ์ด๋ฒคํŠธ๋ฅผ ์ˆ˜์‹ ํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค. 2021. 12. 28.
[Vue.js] v-bind ๋ž€? v-bind๋Š” ๋ฐ˜์‘์ ์œผ๋กœ html ์†์„ฑ์„ ์—…๋ฐ์ดํŠธํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค. 2021. 12. 28.
[Vue] Error: Avoided redundant navigation to current location. ํ˜„์žฌ ํŽ˜์ด์ง€์—์„œ ๋™์ผํ•œ ํŽ˜์ด์ง€ ๊ฒฝ๋กœ๋กœ ์ด๋™ํ•˜๋ ค๊ณ  ํ•˜๋ฉด ์ƒ๊ธฐ๋Š” ERROR๋‹ค. ๐Ÿ‘‰๐Ÿป ERROR๊ฐ€ ๋ฐœ์ƒํ•œ ์ฝ”๋“œ this.$router.push('/monitoring'); ๐Ÿ‘‰๐Ÿป ์ˆ˜์ •ํ•œ ์ฝ”๋“œ ๋‘˜์ค‘ ํ•˜๋‚˜๋กœ ๋ฐ”๊ฟ”์ฃผ๋ฉด ๋œ๋‹ค. -catch๋กœ ์˜ค๋ฅ˜๋ฅผ ๋ฌด์‹œํ•˜๊ธฐ this.$router.push('/monitoring').catch(()=>{}); -ํ˜„์žฌ ์ฃผ์†Œ์™€ ์ด๋™ํ•  ์ฃผ์†Œ๋ฅผ ๋น„๊ตํ•ด์„œ ์‹คํ–‰ํ•˜๊ธฐ if (this.$route.path !== '/monitoring') { this.$router.push('/monitoring') } 2021. 11. 24.
๋ฐ˜์‘ํ˜•