JavaScript is the language a browser executes to run a web application. Angular applications are written in TypeScript, a superset of JavaScript, but the browser receives JavaScript after the TypeScript-specific features have been removed. section 3.5
TypeScript asks developers to state the data types they expect. This makes development more predictable, but it does not change JavaScript’s type system. Understanding that distinction helps when a type annotation disappears from the code the browser runs. section 3.5 section 3.4
From application files to browser code
Run `ng serve` to build an Angular project. The TypeScript compiler converts TypeScript files to JavaScript; the Angular compiler converts template content and expressions into JavaScript statements that use browser APIs. Webpack follows imports from `main.ts` and bundles the resulting code for the browser. This describes the development build, not the deployment build. section 9.3.2
Table 9.7. The bundles produced by the Angular build process
|
Name
|
Description
|
|
main.js
|
This file contains the compiled output produced from the
src/app folder.
|
|
polyfills.js
|
This file contains JavaScript polyfills required for features used by the application not supported by the target browsers.
|
|
runtime.js
|
This file contains the code that loads the other modules.
|
|
styles.js
|
This file contains JavaScript code that adds the application’s global CSS stylesheets.
|
|
vendor.js
|
This file contains the third-party packages the application depends on, including the Angular packages.
|
Use the bundle table to locate the application’s compiled code in `main.js` and distinguish it from runtime code, polyfills, styles, and third-party packages. section 9.3.2











