docs(aot): More consistency edits to aot/jit
This commit is contained in:
parent
c15a68e591
commit
053ecc2b10
@ -28,13 +28,14 @@ block includes
|
||||
+ifDocsFor('ts')
|
||||
a#aot
|
||||
:marked
|
||||
## Ahead of Time (AOT) Compilation
|
||||
## Ahead-of-Time (AoT) Compilation
|
||||
.l-sub-section
|
||||
:marked
|
||||
Angular applications can be compiled by developers at build-time.
|
||||
By compiling your application using the compiler-cli, `ngc`, you can bootstrap directly
|
||||
to a Module Factory, meaning you don't need to include the Angular compiler in your javascript bundle.
|
||||
Ahead of Time compiled applications also benefit from decreased load time and increased performance.
|
||||
Ahead-of-time compiled applications also benefit from decreased load time and increased
|
||||
performance.
|
||||
|
||||
:marked
|
||||
## Angular Module
|
||||
@ -415,12 +416,13 @@ a#H
|
||||
+ifDocsFor('ts')
|
||||
a#jit
|
||||
:marked
|
||||
## Just in Time (JIT) Compilation
|
||||
## Just-in-Time (JiT) Compilation
|
||||
.l-sub-section
|
||||
:marked
|
||||
With Angular _Just in Time_ bootstrapping you compile your components and modules in the browser
|
||||
With Angular _Just-in-time_ bootstrapping you compile your components and modules in the
|
||||
browser
|
||||
and launch the application dynamically. This is a good choice during development.
|
||||
Consider the [Ahead of Time](#aot) mode for production apps.
|
||||
Consider the [Ahead-of-time](#aot) mode for production apps.
|
||||
|
||||
.l-main-section#K
|
||||
:marked
|
||||
|
@ -14,7 +14,8 @@ include ../_util-fns
|
||||
the need to specify them repeatedly in every component of your application.
|
||||
|
||||
The `@NgModule` metadata give the Angular compiler the context needed so that you can use the same code
|
||||
regardless of whether you are running Angular in [Ahead of Time](../glossary.html#aot) or [Just in Time](../glossary.html#jit) mode.
|
||||
regardless of whether you are running Angular in [Ahead-of-time](../glossary.html#aot) or [Just
|
||||
in Time](../glossary.html#jit) mode.
|
||||
|
||||
## How do I use them?
|
||||
|
||||
@ -82,7 +83,7 @@ code-example(format='.' language='javascript').
|
||||
|
||||
:marked
|
||||
## 3. Update your bootstrap
|
||||
Update your `main.ts` file to bootstrap using the "Just in Time" (JIT) compiler.
|
||||
Update your `main.ts` file to bootstrap using the "Just-in-time" (JiT) compiler.
|
||||
|
||||
code-example(format='.' language='javascript').
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
@ -133,7 +133,7 @@ a#bootstrap
|
||||
Angular offers a variety of bootstrapping options, targeting multiple platforms.
|
||||
In this page we consider two options, both targeting the browser.
|
||||
|
||||
### Dynamic bootstrapping with the Just-In-Time (JIT) compiler
|
||||
### Dynamic bootstrapping with the Just-in-time (JiT) compiler
|
||||
In the first, _dynamic_ option, the [Angular compiler](../cookbook/ngmodule-faq.html#q-angular-compiler "About the Angular Compiler")
|
||||
compiles the application in the browser and then launches the app.
|
||||
|
||||
@ -144,12 +144,12 @@ a#bootstrap
|
||||
<live-example embedded plnkr="minimal.0" img="devguide/ngmodule/minimal-plunker.png">Try the live example.</live-example>
|
||||
|
||||
|
||||
### Static bootstrapping with the Ahead-Of-Time (AOT) compiler
|
||||
### Static bootstrapping with the Ahead-Of-time (AoT) compiler
|
||||
|
||||
Consider the static alternative which can produce a much smaller application that
|
||||
launches faster, especially on mobile devices and high latency networks.
|
||||
|
||||
In the _static_ option, the Angular compiler runs ahead of time as part of the build process,
|
||||
In the _static_ option, the Angular compiler runs ahead-of-time as part of the build process,
|
||||
producing a collection of class factories in their own files.
|
||||
Among them is the `AppModuleNgFactory`.
|
||||
|
||||
@ -164,9 +164,10 @@ a#bootstrap
|
||||
The application code downloaded to the browser is much smaller than the dynamic equivalent
|
||||
and it is ready to execute immediately. The performance boost can be significant.
|
||||
|
||||
Both the JIT and AOT compilers generate an `AppModuleNgFactory` class from the same `AppModule` source code.
|
||||
The JIT compiler creates that factory class on the fly, in memory, in the browser.
|
||||
The AOT compiler outputs the factory to a physical file
|
||||
Both the JiT and AoT compilers generate an `AppModuleNgFactory` class from the same `AppModule`
|
||||
source code.
|
||||
The JiT compiler creates that factory class on the fly, in memory, in the browser.
|
||||
The AoT compiler outputs the factory to a physical file
|
||||
that we're importing here in the static version of `main.ts`.
|
||||
|
||||
In general, the `AppModule` should neither know nor care how it is bootstrapped.
|
||||
|
Loading…
x
Reference in New Issue
Block a user