Routing and Lazy Loading with Standalone Components

preview_player
Показать описание
Now that we can build an application using standalone components, we don't need Angular modules (also called NgModules).

But then ... where do we put our routes?

Let's look at how to do routing, including lazy loading, without an NgModule.

To create an application without NgModules, we add the list of routes to the bootstrapApplication configuration. In the providers array, we specify provideRouter and pass in our routes.

To lazy load a set of child routes, use loadChildren.

To lazy load an individual component, use loadComponent.

*Links*

*Content*
00:00 Routing + Lazy Loading with Standalone Components
00:20 Routing with NgModules (App module)
00:58 Routing to child routes with NgModules (feature modules)
01:16 Running to see the routes
01:53 Migrating components to standalone
02:09 Routing without NgModules
03:03 Child Routes without NgModules: provideRouter
05:27 Lazy loading child routes without NgModules: loadChildren
07:51 Lazy loading standalone components without NgModules: loadComponent
10:03 Removing Feature NgModules
10:34 Wrap Up

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 10,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #bestpractices #angulartutorial #angularstandalonecomponents #standalonecomponents #demo #lazyloading #lazyloadinginangular #angularlazyloading #routinginangular #routingangular #angularrouting
Рекомендации по теме
Комментарии
Автор

Crystal clear explanation! Thank you! ....greetings from Holland :)

romeoprofijt
Автор

This is probably the cleanest explanation about Standalone Components I've ever seen. You've saved my time lots of time, thank you! 😇

月-vd
Автор

i watch your videos on pluralsight seeing you provide free videos on youtube warms my heart.

Eaglessoft
Автор

I'm using for the first time a standalone component in my application and didn't know how to handle its routing; thankfully your video came up in the search results!
As always your videos are amazing and full of real world examples. Already saved the other standalone related videos in my watch later list 😃

danielabonvini
Автор

Been looking for a while to implement more than one, or multiple, router-outlet in Angular 17 with all the standalone new stuff. This video was all I needed, appreciate the effort and explanation. Straightforward. You just gained a subscriber.

alfyxxxxx
Автор

I learned Angular thanks to you in Pluralsight, and now I love Angular, just because the good explanations you provide and how easy to understand is.

jaimemartin
Автор

One of the best tutorilals I found on youtube !!!

simenesky
Автор

I am a new follower From Egypt 🇪🇬 of this wonderful channel ❤️.

ahmedsalah
Автор

Very clean explanation of routing and lazy loading with standalone components. Thank you and good health. please make more videos on angular 16 new features.

sakarsr
Автор

I've been looking for this for a few days now. I'm glad I found your channel, Deborah. That's what I call quality conent.

barcioch_
Автор

awesome video I learned a lot about routing and standalone components

teekaejordan
Автор

Thanks for this video ... I think this is the best explanation of Standalone Components with Lazy loading ... :)

ankitmvp
Автор

Wow, thank you so much! This is incredibly helpful for a beginner like me!

HuyNguyen-dyeo
Автор

Deborah, you're a gem! Thanks for always delivering quality videos ❤

michaelgolden
Автор

Lol perfect timing! I'm currently migrating our App to standalone right now 😁

sidneyshuman
Автор

You are awesome Debora.. Thank you so much...

sukruozdemir
Автор

The best trainer I have ever known! Your way of teaching has inspired me to learn html, css which iIwas afraid of from 13 years! I have started working on a project from scratch . And I'm using Angular 17. Could you please guide on that..

jyothsnareddy
Автор

Nice explanation! Your teaching skills are excellent

ansumanmishra
Автор

Thank you so musch ! Love this channel.

demidovmaxim
Автор

Muchas gracias!!!! thank you for the lesson

nayosx