Skip to content

Commit 479a6de

Browse files
committed
Add differential loading strategy question
1 parent 5a961ce commit 479a6de

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
|138| [How do you select an element with in a component template?](#how-do-you-select-an-element-with-in-a-component-template)|
147147
|139| [How do you detect route change in Angular?](#how-do-you-detect-route-change-in-angular)|
148148
|140| [How do you pass headers for HTTP client?](#how-do-you-pass-headers-for-http-client)|
149+
|141| [What is the purpose of differential loading in CLI?](#what-is-the-purpose-of-differential-loading-in-cli)|
149150

150151
1. ### What is Angular Framework?
151152

@@ -1812,4 +1813,10 @@
18121813
18131814
return this._http.get<any[]>('someUrl', { headers: headers, params: params })
18141815
```
1816+
141. ### What is the purpose of differential loading in CLI?
1817+
From Angular8 release onwards, the applications are built using differential loading strategy from CLI to build two separate bundles as part of your deployed application.
1818+
1. The first build contains ES2015 syntax which takes the advantage of built-in support in modern browsers, ships less polyfills, and results in a smaller bundle size.
1819+
2. The second build contains old ES5 syntax to support older browsers with all necessary polyfills. But this results in a larger bundle size.
1820+
1821+
**Note:** This strategy is used to support multiple browsers but it only load the code that the browser needs.
18151822

0 commit comments

Comments
 (0)