Building A JavaScript Router

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

This is amazing, The ability to route with pure java-script and few lines of codes. Great work!

zahidulislam
Автор

This aged like fine wine since its vanilla, well done!

Nodsaibot
Автор

thank you so much i was searching for this very badly

aviroxi
Автор

this video is great and help me so much. thank you

hamoonhaghshenas
Автор

@Theodore Anderson,
Thanks for amazing tutorials. How can i display different data for different route ??

shaonkabir
Автор

thanks, it's very usefull to learn basic about javascript route

AchmadYusriAfandi
Автор

Thanks for the excellent example of creating a router using javascript.

kite
Автор

This info is great for top level urls, but how about nested urls like /about/contact or /contact/phone?

farid
Автор

Indenting only once space makes it kinda hard to follow sometimes...
Otherwise, cool stuff!

matthijshebly
Автор

Thanks for tutorial i can make this if i have several html pages ?

ahmedatya
Автор

how can we make parameterized routing with just vanilla?

anishman
Автор

thank u, but how can i make the browser back and forward buttons work with the router? like if i route to some object and then click the back button nothing happens with your solution

עמיתמאור-קה
Автор

Hi, sorry for my noob question.I'm using XAMPP for the server, and when I try to access "localhost/about" I get an error (page not found)... How can the navigator load a page that doesn't exist?. Is this behaving this way because i'm not using node.js & express ?

maf
Автор

Great tutorial. I'm using webpack to run a localhost server.
I get "Cannot GET /about" instead. any ideas why?

vkendal
Автор

Amazing But how can i add an HTML content when route ?

aeeweb
Автор

What about managing of external file? e.g.: external js, css files. How to manage theese? :)

VHMate
Автор

I noticed if I write the url int he browser example "localhost/about" then it doesn't route, only way it routes by clicking on the about button. Is there a way to route both way? clicking and hard typing the URL?

zahidulislam
Автор

HI, this only works in the root? cause i run in domain.com/examples/router and when i put other path for example it goes to that root and appears 404 not found.


How can i make to work this in that path?

malowzin
Автор

when I reload the page it says, "Cannot GET /path"

matchakrone
visit shbcf.ru