Vue JS 3 Tutorial for Beginners #8 - The Vue Router

  Рет қаралды 256,522

Net Ninja

Net Ninja

Күн бұрын

In this Vue 3 tutorial we'll take a look at the Vue Router in order to make a "multi-page" Vue website. We'll see how to set uo the Vue Router, how to use Router Links, pass route parameters & more.
--- Timestamps ---
0:00 - Why use the Vue Router?
2:36 - Vue Router setup (for new projects)
12:30 - Router links
19:06 - Folder structure
24:54 - Route parameters
31:08 - Dynamic links
36:35 - Redirects & 404's
41:49 - Programmatic navigation
🐱‍💻 🐱‍💻 BUY THE FULL 20-hr COURSE ON UDEMY:
www.thenetninja.co.uk/udemy/v...
🐱‍💻 🐱‍💻 Course Files:
+ github.com/iamshaunjp/Vue-3-F...
🐱‍👤🐱‍👤 JOIN THE GANG -
/ @netninja
🐱‍💻 🐱‍💻 My Udemy Courses:
+ Modern JavaScript - www.thenetninja.co.uk/udemy/m...
+ Vue JS & Firebase - www.thenetninja.co.uk/udemy/v...
+ D3.js & Firebase - www.thenetninja.co.uk/udemy/d...
🐱‍💻 🐱‍💻 Helpful Links:
+ HTML & CSS Course - • HTML & CSS Crash Cours...
+ Get VS Code - code.visualstudio.com/
🐱‍💻 🐱‍💻 Social Links:
Facebook - / thenetninjauk
Twitter - / thenetninjauk
Instagram - / thenetninja

Пікірлер: 210
@kierrboy8613
@kierrboy8613 2 жыл бұрын
CSS style 35:43 job css .job h2 { background: #f4f4f4; padding: 20px; border-radius: 10px; margin: 10px auto; max-width: 600px; cursor: pointer; color: #444; } .job h2:hover { background: #ddd; } .job a { text-decoration: none; } 44:11 button css button { margin: 0 10px; padding: 10px; border: none; border-radius: 4px; }
@mohamedalqady7427
@mohamedalqady7427 2 жыл бұрын
if there is alot of people like you the world will be better
@bobooffice7718
@bobooffice7718 Жыл бұрын
thank you 🤗
@BarbaraBezd
@BarbaraBezd 3 ай бұрын
why I noticed that only after a lesson🥲
@nageshnagansur7904
@nageshnagansur7904 3 жыл бұрын
God Level Simplicity with explanation .
@clone1496
@clone1496 8 сағат бұрын
hey man, quick message to thank you for how well everything is explained. it's a blast to watch and i appreiciate you outputting so many videos. thank you
@user-vx6ll7ri1q
@user-vx6ll7ri1q 11 ай бұрын
I'm not an english native speaker but I found this series of videos and I understood everything. These tutorials are just perfect. Thank you!
@NetNinja
@NetNinja 11 ай бұрын
Great to hear! :) thank you for watching
@yasharsoleimani27
@yasharsoleimani27 3 жыл бұрын
I've been searching the Internet for hours to find a video or sth to teach me vue-router simple and fast and you did it the best way. Thanks, man!
@elliotanimations1067
@elliotanimations1067 Жыл бұрын
I can't express how much you've helped me with your videos. I never understood the Vue environment or how anything links together, and using the CLI always brought back errors. But from the start up until now (haven't got any further just yet!) it's been a total breeze. Thank you so much
@NetNinja
@NetNinja Жыл бұрын
That's awesome to hear Elliot :) thanks for the kind words and stick with it!
@deshantdevkota2563
@deshantdevkota2563 11 ай бұрын
same here haha, thanks from my side too
@sureshramanan6053
@sureshramanan6053 2 жыл бұрын
the music that plays when projects get created is hilariously merry and nostalgic!
@sureshramanan6053
@sureshramanan6053 2 жыл бұрын
wanted to say thanks for this very helpful vue tutorial playlist! I am learning vue for the first time and I am feeling great with the exercises!!!
@unfroz3n118
@unfroz3n118 2 жыл бұрын
I’ve seen studies on this where people mention background music while waiting for a task to be completed, it’s a human subconscious thing I think.
@oldclient
@oldclient 2 жыл бұрын
It's just a very good explanation of the Vue CLI routing architecture without any fluff words. Not a complex, nor a simple context. Keep do this.
@hosseinjavan137
@hosseinjavan137 2 жыл бұрын
there is no doubt about you being an awesome teacher. But I just realized part of why I like your tutorials is because of your damn beautiful voice. Wish you the best :)
@ladywebber1726
@ladywebber1726 3 жыл бұрын
my favorite online tutor EVER, many blessings
@nitinkaushik5144
@nitinkaushik5144 2 жыл бұрын
Thank you Shaun for making awesome tutorials. You have made web so much easy and fun. It seems like Mario and Luigi are part of my life now :D
@danishiqbal2047
@danishiqbal2047 10 ай бұрын
Seriously, been trying for two days to find a truly beginner tutorial. All those videos claiming to be beginner friendly have a curse of knowledge where they don't even know what its like to be a beginner. What you did starting this video and upto 2:30 is empathy. Thank you.
@NetNinja
@NetNinja 10 ай бұрын
Glad it was helpful Danish :) thanks for watching!
@jgarciascr5
@jgarciascr5 2 жыл бұрын
Beautiful tutorial, very clearly explained to make it really easy to understand. Blessings.
@nematjonabdulloev3568
@nematjonabdulloev3568 3 жыл бұрын
descriptive and easy to follow. Great job 👍👌.
@NetNinja
@NetNinja 3 жыл бұрын
Glad you liked it!
@the-roc-lover.1
@the-roc-lover.1 Жыл бұрын
Wow! Thanks for this amazing tutorial. I never watch any tutorial more than 5 minutes but your's was definitely worth it. I've been trying to understand how Vue router works in comparison to react router, and this video made it clear to me that Vue is definitely going to be my next best framework. Thanks again 👋
@NetNinja
@NetNinja Жыл бұрын
You're very welcome! Thanks for your support Riches :)
@ranjitkumarpk35
@ranjitkumarpk35 2 жыл бұрын
Really Helpful and a good explanation. Thank you so much. I have cleared so many concept from this.
@neeqquu
@neeqquu Жыл бұрын
this is the best vue tutorial ever! please never delete this :)
@AlinaKay47
@AlinaKay47 3 жыл бұрын
Many thanks for such a great and easy to follow video!
@dianasaramago3304
@dianasaramago3304 3 жыл бұрын
Excellent tutorial! It helped me a lot! Thank you very much!!
@devserendipity3063
@devserendipity3063 3 жыл бұрын
Dude!! Thank you! I will recomend your tutorials to everyone
@aarondv
@aarondv 3 жыл бұрын
this is the best content about vue.js.. thanks
@cedrickcampoto2670
@cedrickcampoto2670 2 жыл бұрын
I would like to thank you, because you are very clear in teaching this topic. I mean very.
@omarmomen2098
@omarmomen2098 3 жыл бұрын
u are amazing sir, i never find some one who can explain like u do, thank u ❤💕
@guna23785
@guna23785 3 жыл бұрын
He is a Ninja ! Very good way of teaching
@ya_volk9059
@ya_volk9059 3 жыл бұрын
You are such a brilliant teacher
@stefanventer575
@stefanventer575 3 жыл бұрын
Thank you very much. This is exactly what I wanted to know.
@EduardKaresli
@EduardKaresli 2 жыл бұрын
Gold, as always. Thanks a lot!
@JohnDoeX1966
@JohnDoeX1966 Жыл бұрын
Amazing tutorial. Thank you!
@minhthongvo5989
@minhthongvo5989 2 жыл бұрын
Thank you so much for this tutorials, this help me a lot for my jobs!
@ramil8029
@ramil8029 Жыл бұрын
These tutorials are so good! Thank you so much @TheNetNinja!
@NetNinja
@NetNinja Жыл бұрын
You're very welcome Ramil, thanks for your support!
@LilStrangeSquirrel
@LilStrangeSquirrel 6 ай бұрын
English isn't my native language but everything sounds so much clear when you explain it. Thank you so much
@jayce1098
@jayce1098 3 жыл бұрын
Thanks Ninja , this a pretty good tutorial series
@jetzemeilink
@jetzemeilink 3 жыл бұрын
Thanks Shaun for bringing us this quality content and your ability to break things down and explain them clearly. I bought your vue 3 course and it was one of the best courses I've taken so far. You're an incredible help as I'm trying to land my first dev job in Holland.
@NetNinja
@NetNinja 3 жыл бұрын
Thanks so much :) good luck with job hunting, I hope you do really well!
@jetzemeilink
@jetzemeilink 2 жыл бұрын
@@NetNinja Thanks Shaun. Just got my first job as a junior dev and it was partly due to my Vue knowledge!
@antoniofuller2331
@antoniofuller2331 2 жыл бұрын
"partly" lol
@Wilhelm_LAS
@Wilhelm_LAS 2 жыл бұрын
Same man haha i just learning vue js to get in to a job as an internship
@Wilhelm_LAS
@Wilhelm_LAS 2 жыл бұрын
@@antoniofuller2331 sdfkshdfkjf
@suman-majhi
@suman-majhi 3 жыл бұрын
one interesting fact.... this video is able to satisfy all viewer .... this video has 0 dislike
@lucien5112
@lucien5112 3 жыл бұрын
oof yall jinxed it
@kristofferjohansson3768
@kristofferjohansson3768 3 жыл бұрын
@@lucien5112 yeah, that one must be a competitor.
@arunshetty6413
@arunshetty6413 8 ай бұрын
Simple and the Best explanation 🎉
@alexnon8122
@alexnon8122 3 жыл бұрын
Вот это Ты, многоуважаемый, молодец) Спасибо за столь качественное и детальное разъяснение. 3 года назад на vue писал приложения, да потом забил. Решил вспомнить и пройтись по всему. У Тебя, по сути, самые лучшие уроки. Спасибо. Специально на русском написал, чтобы Ты знал, что смотрят Тебя из разных стран)
@mtSabariPrasanthG
@mtSabariPrasanthG 2 жыл бұрын
i loved the music when it is loading bro
@jaxparrow1794
@jaxparrow1794 3 жыл бұрын
4 months later and 0 dislikes. Thanks man!
@gennaromanzo2005
@gennaromanzo2005 Жыл бұрын
Very nice tutorial, thank you!
@NetNinja
@NetNinja Жыл бұрын
Thanks for watching Gennaro :)
@learnsimple4592
@learnsimple4592 3 жыл бұрын
Thanks, love your tutorials Shaun. When will you updating the ninja sass course. I have been trying to learn sass ever since I learnt html, css and modern js from you. A update to the sass course will be very much appreciated.
@jimmymbotela6533
@jimmymbotela6533 2 жыл бұрын
Excellent tutorial! Thank you very much!!keep up the good work 👌👍
@NetNinja
@NetNinja 2 жыл бұрын
Thanks Jimmy :)
@disneywali8943
@disneywali8943 Жыл бұрын
enjoyed your videos, you done great work, Thanks mate
@Amirhosseindev
@Amirhosseindev Жыл бұрын
It's such good video because of its simplicity and being short It's a bit hard though for someone who's not have any coding experience But for me it's awesome
@sarahAmonem
@sarahAmonem Жыл бұрын
you are my best teacher ever, ur student from Africa - Sudan 🥳
@deamonangel2192
@deamonangel2192 7 ай бұрын
That’s explained itself very well, Great work 🎉
@NetNinja
@NetNinja 7 ай бұрын
Thanks a lot 😊
@push2me936
@push2me936 Жыл бұрын
Thank you a lot! And again let's give that a wow! Best regards from here!
@mehdimortaz351
@mehdimortaz351 2 жыл бұрын
Wonderful. I appreciate for ur useful tutorial.
@mehlulinokwara3841
@mehlulinokwara3841 7 ай бұрын
Thanks buddy. I'd recommend every newbie and advanced student of vue and laravel to your great content. Was displeased when I couldn't get you on Java ha ha ha. Consider that sometime.
@AcidRainbowSkies
@AcidRainbowSkies 2 жыл бұрын
really easy to follow and super clear, thank you! this is super helpful!
@gillesgoutard9639
@gillesgoutard9639 3 жыл бұрын
the best as usual!!
@arifdevcoding
@arifdevcoding 2 жыл бұрын
why did i buy Hitesh Choudury's course, this free video is way better than that. you are great bro! Subscribed!
@AccessCode101
@AccessCode101 3 жыл бұрын
It's worth to mention, Shaun, that if we installed vue-router manually and not using the Vue CLI, we need to add vue-router@next, because the createWebHistory was not part of earlier version installments in vue-router before 3.0.
@Jel.Awesh.M
@Jel.Awesh.M 3 жыл бұрын
For me, it seems to not work for any version before vue-router 4.0
@saidaouyous861
@saidaouyous861 7 ай бұрын
Best course ever about vue router 👏
@NetNinja
@NetNinja 7 ай бұрын
Thanks! :)
@nidheeshpv8300
@nidheeshpv8300 2 жыл бұрын
Thank You... Perfect one 💕
@tr5946
@tr5946 3 жыл бұрын
I like this. I like this very much. You are a good teacher.
@NetNinja
@NetNinja 3 жыл бұрын
Thank you! 😃
@cardobent5722
@cardobent5722 3 жыл бұрын
thanks for this video learned allot from here
@patrikmihalovic5796
@patrikmihalovic5796 Жыл бұрын
Great stuff man!
@bortolottic
@bortolottic 2 жыл бұрын
Awesome video... congrats!
@alfriansyah9895
@alfriansyah9895 2 жыл бұрын
my english not good , but clearly your tutorial make me understand !! , keep it upp body , huge love from the distance
@speckyferns6780
@speckyferns6780 2 жыл бұрын
The free tutorials are so good, I'm just going to buy a couple courses from you Net Ninja off Udemy. Thanks so much! Also, love the background music while projects are being created by @vue/cli :)
@MVRugby
@MVRugby 2 жыл бұрын
Dude, thank you so much for this vid. It honestly saved my life!! Well, OK that was a bit over the top, but you saved me from a long drawn out headache. =)
@NetNinja
@NetNinja 2 жыл бұрын
Aha, glad it helped! :)
@rahulkatre17
@rahulkatre17 Жыл бұрын
I got a 3.8 lpa just because you thanks man🔥
@LinuxForLife
@LinuxForLife 3 жыл бұрын
Clear and efficient. Thanks. Vuex is on your roadmap?
@user-bk6qj7wo6n
@user-bk6qj7wo6n 2 жыл бұрын
thank you for sharing you knowledge
@euniceoqui
@euniceoqui 3 жыл бұрын
You're amazing 😭😭😭
@balajisri5091
@balajisri5091 Жыл бұрын
Thanks a lot man. Great Work.
@NetNinja
@NetNinja Жыл бұрын
Thanks Balaji :)
@michaelvli
@michaelvli 2 жыл бұрын
Thanks for your videos, Shaun. They are awesome! Perfect for Vue newbies. One thing that I noticed was that you never get any vulnerabilities when creating a project. I'm on a mac using npm 8.1.0 and node v17.0.1. Should I be concerned that I have over 80+ high and medium vulnerabilities? I have read that devs shouldn't be concerned about vulnerabilities as this is related to the packages/modules that are being used and unless I plan to use something else or fix these vulnerabilities, there's not much that can be done. What do you recommend? Thanks again!
@ahamster3000
@ahamster3000 Жыл бұрын
from Morocco , thank you
@NetNinja
@NetNinja Жыл бұрын
Thanks Zakaria :) big love to Morocco!
@hannahbaker411
@hannahbaker411 Жыл бұрын
great video thanks for the tutorial sir
@gmd2171
@gmd2171 Жыл бұрын
Thank you for your time sir.
@NetNinja
@NetNinja Жыл бұрын
You're very welcome Ghulam!
@REZAsys2
@REZAsys2 2 жыл бұрын
Your tutorials are perfect but make me sleepy xd idk why!
@abeprangishvili
@abeprangishvili 3 жыл бұрын
you are the best !!!!!!
@mohammadvempalli3973
@mohammadvempalli3973 3 жыл бұрын
More detailed video👏👏👏
@kirillbaryba746
@kirillbaryba746 3 жыл бұрын
Thanks! Awesome
@shubhang2877
@shubhang2877 3 жыл бұрын
Shaun: *exists* Me: Happiness Noises
@user-ny4yt1kf9v
@user-ny4yt1kf9v 3 жыл бұрын
GUUUUUUUUUUUUUUUU
@kiran_hm1748
@kiran_hm1748 3 жыл бұрын
You are the best ❤️❤️❤️
@jimos9878
@jimos9878 7 ай бұрын
Very very very very nice tutorial. Explanatory with such understandable way. I am currently having an issue when I redirect but the page does not change, and I think it has to do with the router view tag, which I would not be able to understand through the documentation of vue... I will definitely visit the other tutorials as well. so stupid of me to not look up any video tutorials so far :S
@comtarthur
@comtarthur 3 жыл бұрын
i love all your videos they helped me so much but please how do you use vue create without typing npx before ?
@sarahdulat3613
@sarahdulat3613 2 жыл бұрын
Nooo you stopped right at the moment I needed! How can I pass more than just the id through the router link? How would the job details get displayed?
@RobertWildling
@RobertWildling 2 жыл бұрын
Thank you for that nice series! - What I always wonder is how do you write links inside a text editor of a cms, when routes are "ruling" the navigation? Simply wrapping an a-tag around a word does not work, and standard text editors like ckeditor do not have a router implementation. Any ideas?
@juhen9
@juhen9 2 жыл бұрын
Legend
@arturgorbunov3792
@arturgorbunov3792 Жыл бұрын
For them who creates project straightforward, not like The Net Ninja => vue create ['name'] => (then) npm install vue-router@4 || (or) npm install vue-router@next => (then) just create all needed folders and files, which you see in the video, by your self. Yes, sometimes you have to do something by your own, create, refactor and so on. Ofc, if someone here is just because Front-End hobby, then we are sorry for these issues.
@safiakhan5239
@safiakhan5239 Жыл бұрын
Thank you very much for sharing such a techy topic in so beautiful comprehensive way. I wish my words can express my gratitude towards you. One request please could you please share the code you did in this tutorial please please. Thanks again
@gustavofrez6185
@gustavofrez6185 2 жыл бұрын
CSS : .job h2 { background: #f4f4f4; padding: 20px; border-radius: 10px; margin: 10px auto; max-width: 600px; cursor: pointer; color: #444; } .job h2:hover { background: #ddd; } .job a { text-decoration: none; }
@kaushikrishi01
@kaushikrishi01 2 жыл бұрын
Hey Shaun! What software do you use to create slides ?
@codeblood87
@codeblood87 3 ай бұрын
Lovely
@freecourse1842
@freecourse1842 3 жыл бұрын
Thanks
@robingiri7281
@robingiri7281 3 жыл бұрын
you are rock star ...
@viquiboirasanmarti89
@viquiboirasanmarti89 Жыл бұрын
Thank you very much for the tutorial, it has helped me a lot for my website. But I have a question, how do I update the content of the Job component with a watch, inside the component itself? For example, if a Job had Related Job that can be queried?
@noushedakib1658
@noushedakib1658 2 жыл бұрын
awesome
@henriqueaurelio8400
@henriqueaurelio8400 3 жыл бұрын
Which would be the folder structure with a navbar component would be before link router or another component in the components folder?
@1eagleusa
@1eagleusa 7 ай бұрын
Excellent series, I have learned a lot. There is a question I have though, for the 404 NotFound section. In that section the component is within the views/jobs folder but the binding is only to the views folder. It seems to work in your demo, so does that mean that when binding that as long as the root folder is specified the sub folders will be searched for the filename? If the binding to the component requires specific path then why did it work in the demo?
@RandomAlexus
@RandomAlexus Жыл бұрын
Thanks!
@NetNinja
@NetNinja Жыл бұрын
Thanks for your support Alexus!
@RandomAlexus
@RandomAlexus Жыл бұрын
@@NetNinja and thank you for the high quality videos!
@mullla1ya
@mullla1ya 3 жыл бұрын
Very cool! A bit of a question. When we go to /jobs/gibberish it shows us "Job ID is: gibberish" while this job ID doesn't exist in the array. I know it's dynamically bound but I think it has to show 404 page, isn't it?
@ganeshdagadi6577
@ganeshdagadi6577 2 жыл бұрын
Normally in a real world application, you send a request to a backend. When the backend responds with a 404, you then show the not found page.
@reydelocon629
@reydelocon629 2 жыл бұрын
have u already solved this my g?
@ridl27
@ridl27 3 жыл бұрын
ty.
@00el04
@00el04 3 жыл бұрын
this is the hardest lesson so far
@dasuneranda
@dasuneranda 3 жыл бұрын
wow!
@dimitrioschamarousios1131
@dimitrioschamarousios1131 2 жыл бұрын
The best part is the loading music (4:18)
@franklintorres3717
@franklintorres3717 3 жыл бұрын
It's a perfect tutorial. I love it very much, but why you didn't include the children tree?
@kinax2
@kinax2 3 жыл бұрын
I did the same as you and for some reason when i'm navigating to "/project/:id" i it's navigating from parent and child router -> 2 routers.
@majdibrahem1399
@majdibrahem1399 Жыл бұрын
thanks
@NetNinja
@NetNinja Жыл бұрын
You're welcome!
Vue JS 3 Tutorial for Beginners #9 - Fetching Data
20:10
Net Ninja
Рет қаралды 179 М.
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 15 МЛН
FOOTBALL WITH PLAY BUTTONS ▶️❤️ #roadto100million
00:20
Celine Dept
Рет қаралды 35 МЛН
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 2,5 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 45 МЛН
Vue JS 3 Tutorial for Beginners #7 - Forms & Inputs
45:41
Net Ninja
Рет қаралды 179 М.
Vue 3 Routing - Beginner to Advanced
1:17:05
Laith Academy
Рет қаралды 34 М.
Vue Router | Building single page applications
8:20
Vue Mastery
Рет қаралды 26 М.
The Difference Between Vue and React
10:27
Lachlan Miller
Рет қаралды 30 М.
They Just Fixed VUE ROUTER
2:17
LearnVue
Рет қаралды 32 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
Learn Vuex in 30 MINUTES! (Vue JS 3)
32:12
Make Apps with Danny
Рет қаралды 122 М.
100+ Web Development Things you Should Know
13:18
Fireship
Рет қаралды 1,4 МЛН
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 15 МЛН