You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: public/docs/ts/latest/guide/router.jade
+5-5
Original file line number
Diff line number
Diff line change
@@ -2138,7 +2138,7 @@ h3#preloading <i>Pre-Loading</i>: background loading of feature areas
2138
2138
We've learned how to load modules on-demand, but we can also take advantage of loading feature areas modules in *advance*. The *Router*
2139
2139
supports **pre-loading** of asynchronous feature areas prior to navigation to their respective URL. Pre-loading allows us to to load our initial route
2140
2140
quickly, while other feature modules are loaded in the background. Once we navigate to those areas, they will have already been loaded
2141
-
as if our they were included in our initial bundle.
2141
+
as if they were included in our initial bundle.
2142
2142
2143
2143
Each time a **successful** navigation happens, the *Router* will look through our configuration for lazy loaded feature areas
2144
2144
and react based on the provided strategy.
@@ -2151,7 +2151,7 @@ h3#preloading <i>Pre-Loading</i>: background loading of feature areas
2151
2151
The *Router* also supports [custom preloading strategies](#custom-preloading) to give us control of what we want to pre-load.
2152
2152
2153
2153
We'll update our *CrisisCenterModule* to be loaded lazily by default and use the `PreloadAllModules` strategy to eagerly
2154
-
it them up initial navigation.
2154
+
it up.
2155
2155
2156
2156
<aid="preload-canload"></a>
2157
2157
.l-sub-section
@@ -2191,7 +2191,7 @@ h3#preloading <i>Pre-Loading</i>: background loading of feature areas
2191
2191
2192
2192
:marked
2193
2193
Now when we visit `http://localhost:3000`, the `/heroes` route will load in the foreground, while the *CrisisCenterModule* and any other asynchronous feature
2194
-
modules we could have are _eagerly_ loaded in the background, waiting for us to navigate to them.
2194
+
modules are _eagerly_ loaded in the background, waiting for us to navigate to them.
2195
2195
2196
2196
<aid="custom-preloading"></a>
2197
2197
:marked
@@ -2204,9 +2204,9 @@ h3#preloading <i>Pre-Loading</i>: background loading of feature areas
2204
2204
We can define our own strategy the same way the **PreloadAllModules** modules strategy was provided to our *RouterModule.forRoot* configuration object.
2205
2205
2206
2206
Since we want to take advantage of this, we'll add a custom strategy that _only_ preloads the modules we select. We'll enable the preloading by using the *Route Data*,
2207
-
whichwe learned is an object to store arbitrary route data and and [resolve data](#resolve-guard).
2207
+
which, as we learned, is an object to store arbitrary route data and and [resolve data](#resolve-guard).
2208
2208
2209
-
We'll add a custom `preload` boolean to our `crisis-center` route data that we'll use with our custom strategy. To see it in action, we'll add to
2209
+
We'll add a custom `preload` boolean to our `crisis-center` route data that we'll use with our custom strategy. To see it in action, we'll add
2210
2210
the `route.path` to the `preloadedModules` array in our custom strategy service. We'll also log a message
0 commit comments