What is @angular/platform-browser-dynamic?
The @angular/platform-browser-dynamic npm package provides methods for bootstrapping Angular applications in a browser environment with Just-In-Time (JIT) compilation. This package is typically used for development purposes, as it compiles the application dynamically in the browser, allowing for a faster development cycle. However, for production builds, Ahead-Of-Time (AOT) compilation is preferred for performance reasons, which is handled by the @angular/platform-browser package.
What are @angular/platform-browser-dynamic's main functionalities?
Bootstrapping Angular Modules
This code snippet demonstrates how to bootstrap an Angular module using the platformBrowserDynamic function. It imports the AppModule and then calls the bootstrapModule method to initialize the application.
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Other packages similar to @angular/platform-browser-dynamic
@angular/platform-browser
This package provides tools for running Angular applications in a web browser with Ahead-Of-Time (AOT) compilation. Unlike @angular/platform-browser-dynamic, it is optimized for production by pre-compiling templates to make the application load faster and be more performant.
react-dom
Similar to @angular/platform-browser-dynamic for Angular, react-dom is used for bootstrapping and rendering React applications in the browser. It provides the entry point to the DOM and server renderers for React and can be considered an equivalent in the React ecosystem.
vue
The Vue.js framework has a similar package for bootstrapping and rendering Vue applications in the browser. It provides the functionality to create and mount the root Vue instance to the DOM, similar to how Angular applications are bootstrapped with @angular/platform-browser-dynamic.
19.1.0-next.1 (2024-12-04)
compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| f280467398 | fix | account for multiple generated namespace imports in HMR (#58924) |
core
| Commit | Type | Description |
| -- | -- | -- |
| e894a5daea | feat | set kind field on template and effect nodes (#58865) |
| 3b765367f3 | fix | Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used. (#58929) |
migrations
| Commit | Type | Description |
| -- | -- | -- |
| e31e52e177 | fix | class content being deleted in some edge cases (#58959) |
| 508d3a1b3b | fix | correctly strip away parameters surrounded by comments in inject migration (#58959) |
| 7191aa6e09 | fix | don't migrate classes with parameters that can't be injected (#58959) |
| a4924af6d5 | fix | inject migration aggressively removing imports (#58959) |
| 35165d152d | fix | inject migration dropping code if everything except super is removed (#58959) |
| 68e5ba7a3a | fix | preserve type literals and tuples in inject migrations (#58959) |
platform-server
| Commit | Type | Description |
| -- | -- | -- |
| 1cfbfc66d3 | fix | remove peer dependency on animations (#58997) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.2"></a>