Тёмный
No video :(

Component-Less and Empty-Path Routes in Angular (2023) 

Decoded Frontend
Подписаться 51 тыс.
Просмотров 13 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@laluprasad3775
@laluprasad3775 Год назад
Please make Angular series please ,i want to learn angular.from.you.please
@AlainBoudard
@AlainBoudard Год назад
Excellent Angular content ! As usual, very useful content !
@haroldpepete
@haroldpepete Год назад
great video, your videos are better and better
@DecodedFrontend
@DecodedFrontend Год назад
Thank you 🙏🏻 glad to hear that
@arkabhowmick
@arkabhowmick Год назад
Note: If someone is updating their routes to component-less routes after watching this video, just make sure to check if there is any router.navigate() using relative paths inside those child components (e.g. router.navigate(['../parent', { relativeTo: currentRoute }])). That may need to be updated.
@degloman
@degloman Год назад
👍
@azeemjoseph3946
@azeemjoseph3946 Год назад
thanks for the video, Great content ...!!
@rahultej8352
@rahultej8352 Год назад
very very useful
@nicosaliagas
@nicosaliagas Год назад
Excellent many thanks 👌
@dmytrosokolovsky8959
@dmytrosokolovsky8959 Год назад
Дякую за цікаве та корисне відео 👍 Вперше прийшов до цього методу, коли потрібно було навісити резолвер на декілька роутів та не хотілось копіпастити Якби на інтервью запитали щось про "Component-Less and Empty-Path Routes" навіть не здогадався би про що мова)
@DecodedFrontend
@DecodedFrontend Год назад
В мене часто було таке на співбесідах коли я забував яка «офіційна» назва тієї чи іншої фічі)) тож пояснював своїми своїми словами
@uidhtml
@uidhtml 2 месяца назад
Awesome video.. 👌👌
@malikau917
@malikau917 4 месяца назад
Wow that’s some useful stuff!
@ali-celebi
@ali-celebi Год назад
Excellent video as usual.
@chagamajaykumarreddy1897
@chagamajaykumarreddy1897 Год назад
very usefull tip
@pawekoaczynski4505
@pawekoaczynski4505 Год назад
Great video c: I have a small tip: at 6:19, you can put your cursor on the `=>` and press `Ctrl + .` which allows you to quickly add `return` to the arrow function c:
@DecodedFrontend
@DecodedFrontend Год назад
Nice tip! Thanks, I didn’t know about it:)
@dimitridovgan6364
@dimitridovgan6364 Год назад
Thank you!
@krzysztofprzybylski2750
@krzysztofprzybylski2750 Год назад
Interesting video. I found myself using componentless routes for routed modals. That way angular doesn't complain about route not existing. What I haven't realized is that it worked only because I used it in lazy loaded modules. I'm currently searching for a better solution.
@AlesFrankie
@AlesFrankie Год назад
Every time something new, thanks!
@superduper1211
@superduper1211 Год назад
Dima , your room now is not looking that empty )) good job ))
@DecodedFrontend
@DecodedFrontend Год назад
Ha ha :) My wife cares about that now :D
@alexshubin1
@alexshubin1 Год назад
thanks, very interesting, never used this feature before. Before watching this video I supposed this was about routes that do not show anything (empty or dummy template) but just redirect user to another page. For example when user click some confirm link in email, the frontend just post data to the server and redirect to another (public) page instantly.
@volodymyralexandrov6040
@volodymyralexandrov6040 Год назад
Nice feature! Thanks ❤
@beodan9219
@beodan9219 Год назад
excited
@ankitpandey8614
@ankitpandey8614 Год назад
Really liked your videos man. Please make videos on angular application architecture
@muhammadghaderi4611
@muhammadghaderi4611 Год назад
Very useful! Many thanks for sharing
@wilder_kh
@wilder_kh Год назад
Thanks for the video!
@spzanoosi3237
@spzanoosi3237 Год назад
Awesome as Always!
@gagiksimonyan3782
@gagiksimonyan3782 Год назад
Thanks for another useful video, Dmytro
@denisbielishev
@denisbielishev Год назад
Thanks a lot. As usual, it's a very useful video.
@wiliamferraciolli5380
@wiliamferraciolli5380 Год назад
thats amazing mate, can you do some more around routing, especially resolving data when navigating to a route including refreshing the page
@MrForexify
@MrForexify Год назад
Thanks mate!
@user-wh4pm2bj1q
@user-wh4pm2bj1q Год назад
Nice!
@dhineshrajendran3277
@dhineshrajendran3277 Год назад
Great!. Can you make a video about custom decorator?
@THIAGO_6721
@THIAGO_6721 11 месяцев назад
Incredible
@arny699
@arny699 Год назад
Super useful! As usually. Thank you!
@onodirobert
@onodirobert Год назад
Thank You! But why are you use inject function instead of common guard class? Is it better? Have you any video about inject function usage? Thank you!
@darwinwatterson1732
@darwinwatterson1732 Год назад
It is a new feature the Angular Team recently introduced, I think it works the same, but it is treeshakable
@souhaibkhadraoui9898
@souhaibkhadraoui9898 Год назад
Again, great content ! Could you make a video on Angular RouteReuseStrategy and its use cases ?
@PaweKubiak94
@PaweKubiak94 Год назад
I used it a few days ago, but tbh I wasn't sure if it will work as I thought ;) Btw `discount` keyword works ;) haha
@OfficialVideos482
@OfficialVideos482 Год назад
Awesome 🤩
@dogandipcin
@dogandipcin Год назад
You are the best Dmytro😍
@DecodedFrontend
@DecodedFrontend Год назад
Thanks :) glad to hear that
@kailashpatisinghdeora3677
@kailashpatisinghdeora3677 Год назад
Nice it is handy approach for reusabliliy, Dymtro can you create a video on Dom Sanitization please and how attacker add malicious code in angular.
@DecodedFrontend
@DecodedFrontend Год назад
I like the idea, thank you :)
@kailashpatisinghdeora3677
@kailashpatisinghdeora3677 Год назад
@@DecodedFrontend thanks
@angelpellejero8764
@angelpellejero8764 Год назад
Super interesting as always, thanks!
@GunjanShrimali
@GunjanShrimali 6 месяцев назад
very nice
@c01nd01r
@c01nd01r Год назад
Hey, thanks for the video! I don't use Angular, but it would be interesting to try. In real life apps, developers create Route objects as literals in the routing files? What about type safety and possible typos in the routerLink path directive?
@konradchojnacki8438
@konradchojnacki8438 Год назад
Great content, that technique could be useful in some scenarios. I really like the idea of providing in-depth angular form course. I hope oneday to see similar course about angular PWA, imo there is a lack of up-to-date materials to become comfortable with the topic.
@osamaabozahra
@osamaabozahra Год назад
Thanks for the video, very interesting concept. But Does it work with lazy loaded routes?
@DecodedFrontend
@DecodedFrontend Год назад
Yes, it is :)
@ihorsnisar7420
@ihorsnisar7420 Год назад
Thank you very much for your work, very interesting and informative material. can you make a series of videos about the ubiquitous language and domain oriented design (ddd) in Angular? What is it, how is it customary to implement it in Angular, what difficulties can there be, what will it give in the end .... Once again, thank you very much for your work.
@genyklemberg
@genyklemberg Год назад
Great. I have a questions. What if user data is changed? Routes won't know that until we reload them?
@DecodedFrontend
@DecodedFrontend Год назад
Hi:) yes, you would need to re-activate the route to fetch the new data or use some other techniques to implement polling/reloading logic
@genyklemberg
@genyklemberg Год назад
@@DecodedFrontend thanks;)
@loko1944
@loko1944 Год назад
I learned resolvers once, then I heard its bad because it is synchronous and its better to load data in component. Could You clarify this? Seems like good feature... Anyway great explanation as always. Its awesome you describe use case before exmplaining solution
@lukaszpiotrluczak
@lukaszpiotrluczak Год назад
Resolvers are great, especially when you implement loading state handling. With a little bit of work you can easily create nice user experience around that. You can use resolvers for essential data required for component withoit which it will not work properly. This way you don't have to repeat loading stste logic in all components.
@madeOfClay99
@madeOfClay99 Год назад
Useful video as always! Personally, I'm still waiting for the remake of your Angular Material theming course : )
@udithamax7
@udithamax7 Год назад
Great content as always.. keep it up.. 👍🤘
@stepandemchenko9870
@stepandemchenko9870 Год назад
What about canLoad guards, when I need lazy load specific array of routes?
@DecodedFrontend
@DecodedFrontend Год назад
It works with any guard) p.s keep in mind that canLoad guard is deprecated in favor of canMatch
@Bukratusi
@Bukratusi Год назад
please make more frequent videos and complete playlista nd courses
@brampeirsful
@brampeirsful Год назад
Very nice!
@MikelAingeru
@MikelAingeru Год назад
Great video!! I guess if the user had a global logout button and press it in one of those child routes, since the canActivate guard it's not triggered, could be a problem, isn't it? In such a case, what would happen with the user resolver? Would it return the empty user or would it not be reactivated?
@DecodedFrontend
@DecodedFrontend Год назад
No, it should not be a problem. If you log out you usually don’t need to trigger canActivate guard. You just remove authentication token, etc and redirect to “login” page
@degloman
@degloman Год назад
@@DecodedFrontend In some cases removing the authentication token can't work properly. For example you have a form and want to ask the user if he sure to logout without saved shanges. It makes sense to logout via /logout route and use the canDeactivate guard.
@pollo_cesar_
@pollo_cesar_ Год назад
Nice, I think I tried in older angular version (11 or 8), this is something for 14 or 15 version?
@janeshwarsritharan3698
@janeshwarsritharan3698 Год назад
will this also work if I have lazyily loaded children?
@DecodedFrontend
@DecodedFrontend Год назад
Yep, should work as well.
@TheSaceone
@TheSaceone Год назад
nice strategy, but how could you redirect to another route if for example user is not authenticated?
@Netrole
@Netrole Год назад
You can inject Router in the Guard and navigate to a new url from within the guard. In this case with the isAuthenticated$ observable you can pipe it through a tap function that navigates to /login if the value is false
@DecodedFrontend
@DecodedFrontend Год назад
Thank you, @Netrole for assistant :)
@NH-yv7im
@NH-yv7im Год назад
Hi
@DecodedFrontend
@DecodedFrontend Год назад
Hi 👋🏻
@EtoBARAKUDAvasa
@EtoBARAKUDAvasa Год назад
"it's easy to forget to install the guard when there are many routes"? Seriously? This structure looks difficult even for the eyes. Yes, the code will be reduced but what is the profit? When you have at least 10 routes(and using more than one guard for all) with such a structure, you will be amazed by the complexity structure. But yeah, cool approach if you're alone on the project.
@pavlonaduda8329
@pavlonaduda8329 Год назад
Imagine you have a schematic which add some page with nested components to your project. Also this schematic add a new route with this page. In this situation current approach is very useful, such as you don't want have a guard logic into schematic and just describe it into your routing module.
@DecodedFrontend
@DecodedFrontend Год назад
Hi, Thanks for the feedback. You can always extract the component-less route config in the separate file, give a meaningful name to that constant and just import it to the main router config, so the main config will remain lean and readable.
@devxbasit
@devxbasit 7 месяцев назад
insighful
Далее
Component Input Binding in Angular Router
10:30
Просмотров 9 тыс.
The Tools I Use to Build Products in Laravel
19:00
Просмотров 24 тыс.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Demystifying Angular Two Way Binding (2023)
11:40
Просмотров 12 тыс.
Input Signals in Angular 17.1 - How To Use & Test
14:34
APP_INITIALIZER Token in Angular (Advanced, 2022)
23:56
Hot vs Cold Observable in RxJs (2021)
15:06
Просмотров 27 тыс.