[MUSIC PLAYING] MINKO GECHEV: Hi, everyone. I'm Minko from the
Angular team, and I'm here to share the latest
on standalone APIs. Back in 2022, we
announced our plans to introduce a set
of standalone APIs that would improve
developer ergonomics, reduce the amount
of boilerplate, and move Angular
development forward. Since then, we've heard
from the community that you all love the
improved developer experience. We're thrilled to
have unlocked so much potential for Angular features. In this video,
I'll share with you everything about the
improvements in the routing APIs we introduced in version
15 and all the tooling that we landed in version 16. Before the introduction
of standalone APIs, lazy-loading routes was
a multi-step process, which relied on modules. Consider this example-- we
have a child module, which declares the item's route. In the route's array, we
use the load children syntax to import the items
module, which contains the corresponding routes. This seems like too much
code and too much work to lazy-load routes. And well, we agree. Let's check out the new and
improved lazy-loading syntax in version 15. With standalone
APIs, we can simply declare an array of rules
and use load children with a dynamic import to
lazily load the child routes. Later, we can pass
the route's array to provide router or just export
it, if these are child routes. That's it. No more modules. No for child. That's just way less complexity
and it is way more immediately clear what this code does. There's actually
one more feature that we would like to highlight. Check this out. Remember there was no direct
way to lazy-load components. The only way to achieve this
was through load children. Well, thanks to
standalone APIs, we can now dynamically
lazy-load a component by using the load component
property on the route definition. In this example, the item's
component is lazy-loaded and the code is much clearer. You can learn more about
the improved router APIs on goo.gle/angular
standalone routing. So what's new for the
standalone API in version 16? We made improvements
to the tooling story. Now developers can
create apps bootstrapped with the new standalone APIs
using the standalone flag with ng new. With this change,
you will no longer need to manually convert
your applications after creating them. All right, but what
about our existing apps? Great question. We have something for you too. We're also announcing new
schematics that will allow teams to migrate their
applications from ng module-based to standalone
APIs by running ng generate @angularcore:standalone. The schematics will
guide you through options to convert your components,
directives, and pipes to use standalone APIs. It will also assist you through
removing unnecessary NgModules and even converting
your app to bootstrap using standalone APIs. You can even choose to
migrate specific parts of your application
by specifying a path to the migration tool. To get started, check
out the migration guide at angular.io/guide/standalone
migration. You can use this
tooling today to start taking advantage of all that
standalone APIs have to offer.