Skip to content

Commit

Permalink
docs: add explanation on what lazy loading is (angular#29667)
Browse files Browse the repository at this point in the history
PR Close angular#29667
  • Loading branch information
kapunahelewong authored and BioPhoton committed May 21, 2019
1 parent 5946c51 commit 48f7fdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aio/content/guide/lazy-loading-ngmodules.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ For the final sample app with two lazy loaded modules that this page describes,

## High level view

By default, NgModules are eagerly loaded, which means that as soon as the app loads, so do all the NgModules, whether or not they are immediately necessary. For large apps with lots of routes, consider lazy loading—a design pattern that loads NgModules as needed. Lazy loading helps keep initial
bundle sizes smaller, which in turn helps decrease load times.

There are three main steps to setting up a lazy loaded feature module:

1. Create the feature module.
Expand Down Expand Up @@ -67,9 +70,6 @@ ng generate component customers/customer-list
This creates a folder inside of `customers` called `customer-list`
with the four files that make up the component.

<!-- For more information
about components, see [Components](). -->

Just like with the routing module, the CLI imports the
`CustomerListComponent` into the `CustomersModule`.

Expand Down Expand Up @@ -217,7 +217,7 @@ knows that the route list is only responsible for providing additional routes an

`forRoot()` contains injector configuration which is global; such as configuring the Router. `forChild()` has no injector configuration, only directives such as `RouterOutlet` and `RouterLink`.

For more information, see the [`forRoot()` deep dive](guide/singleton-services#forRoot) section of the [Singleton Services](guide/singleton-services) guide.
For more information, see the [`forRoot()` pattern](guide/singleton-services#forRoot) section of the [Singleton Services](guide/singleton-services) guide.

<hr>

Expand Down

0 comments on commit 48f7fdf

Please sign in to comment.