Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@angular/platform-browser-dynamic
Advanced tools
Angular - library for using Angular in a web browser with JIT compilation
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.
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));
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.
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.
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.
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT
19.0.0-rc.1 (2024-11-06)
| Commit | Type | Description | | -- | -- | -- | | b25121ee4a | fix | avoid having to duplicate core environment (#58444) |
| Commit | Type | Description | | -- | -- | -- | | d4d76ead80 | fix | do not fail fatal when references to non-existent module are discovered (#58515) | | 22cd6869ef | fix | make the unused imports diagnostic easier to read (#58468) |
| Commit | Type | Description | | -- | -- | -- | | 8ae84be3df | fix | avoid slow stringification when checking for duplicates in dev mode (#58521) | | 6e0af6dbbb | fix | resolve forward-referenced host directives during directive matching (#58492) |
| Commit | Type | Description | | -- | -- | -- | | c5e676bb87 | fix | flip the default standalone flag in route-lazy-loading migration (#58474) | | e85ac5c7cb | fix | properly bundle shared compiler code into migrations (#58515) |
| Commit | Type | Description | | -- | -- | -- | | c36a1c023b | fix | correctly add external stylesheets to ShadowDOM components (#58482) |
<!-- CHANGELOG SPLIT MARKER --><a name="18.2.11"></a>
FAQs
Angular - library for using Angular in a web browser with JIT compilation
The npm package @angular/platform-browser-dynamic receives a total of 2,632,332 weekly downloads. As such, @angular/platform-browser-dynamic popularity was classified as popular.
We found that @angular/platform-browser-dynamic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.