
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
@angular/platform-browser
Advanced tools
The @angular/platform-browser package provides services that are essential for running Angular applications in a web browser. This includes DOM manipulation, rendering, and browser interaction APIs.
DOM Manipulation
The BrowserModule provides services that are necessary for any web app, such as DOM rendering, sanitization, and location. It should be imported once in the root module of the app.
import { BrowserModule } from '@angular/platform-browser';
@NgModule({
imports: [BrowserModule],
...
})
export class AppModule { }
Browser Event Handling
The package allows components to handle browser events such as resize, keyup, and more through the HostListener decorator.
import { Component, HostListener } from '@angular/core';
@Component({...})
export class MyComponent {
@HostListener('window:resize', ['$event'])
onResize(event) {
// Handle the browser resize event
}
}
Safe Interpolation
The DomSanitizer service helps prevent Cross Site Scripting Security bugs (XSS) by sanitizing values to be safe to use in the different DOM contexts.
import { DomSanitizer } from '@angular/platform-browser';
@Component({...})
export class MyComponent {
safeUrl;
constructor(private sanitizer: DomSanitizer) {
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl('https://example.com');
}
}
Similar to @angular/platform-browser for Angular, react-dom is used with React to interact with the DOM. It provides methods for rendering components into the DOM and working with the DOM elements.
Vue is a progressive framework for building user interfaces. It provides its own methods for DOM manipulation and updates, similar to what @angular/platform-browser does for Angular applications.
Preact is a fast 3kB alternative to React with the same modern API. It provides similar functionalities for rendering and handling the DOM as @angular/platform-browser does for Angular.
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.2.5 (2025-04-02)
| Commit | Type | Description | | -- | -- | -- | | e61d06afb5 | fix | step 6 tutorial docs (#60630) |
| Commit | Type | Description |
| -- | -- | -- |
| fa48f98d9f | fix | add missing peer dependency on @angular/common
(#60660) |
| Commit | Type | Description | | -- | -- | -- | | ca5aa4d55b | fix | throw for invalid "as" expression in if block (#60580) |
| Commit | Type | Description |
| -- | -- | -- |
| f4c4b10ea8 | fix | Produce fatal diagnostic on duplicate decorated properties (#60376) |
| 22a0e54ac4 | fix | support relative imports to symbols outside rootDir
(#60555) |
| Commit | Type | Description | | -- | -- | -- | | 64da69f7b6 | fix | check ngDevMode for undefined (#60565) | | 8f68d1bec3 | fix | fix ng generate @angular/core:output-migration (#60626) | | bc79985c65 | fix | fix regexp for event types (#60592) | | 006ac7f22f | fix | fixes #592882 ng generate @angular/core:signal-queries-migration (#60688) | | da6e93f434 | fix | preserve comments in internal inject migration (#60588) | | dbbddd1617 | fix | prevent omission of deferred pipes in full compilation (#60571) |
| Commit | Type | Description | | -- | -- | -- | | 0e9e0348dd | fix | Update adapter to log instead of throw errors (#60651) |
| Commit | Type | Description | | -- | -- | -- | | 15f53f035b | fix | handle shorthand assignments in super call (#60602) | | 4b161e6234 | fix | inject migration not handling super parameter referenced via this (#60602) |
| Commit | Type | Description | | -- | -- | -- | | 958e98e4f7 | fix | Add missing types to transition (#60307) |
| Commit | Type | Description | | -- | -- | -- | | 7cd89ad2c6 | fix | assign initializing client's app version, when a request is for worker script (#58131) |
<!-- CHANGELOG SPLIT MARKER --><a name="19.2.4"></a>
FAQs
Angular - library for using Angular in a web browser
The npm package @angular/platform-browser receives a total of 2,384,151 weekly downloads. As such, @angular/platform-browser popularity was classified as popular.
We found that @angular/platform-browser 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.