W3cubDocs

/Angular

@angular/platform-browser

package

Supports execution of Angular apps on different supported browsers.

The BrowserModule is included by default in any app created through the CLI, and it re-exports the CommonModule and ApplicationModule exports, making basic Angular functionality available to the app.

For more information, see Browser Support.

Entry points

Primary

@angular/platform-browser

Supports execution of Angular apps on different supported browsers.

Secondary

@angular/platform-browser/animations

Provides infrastructure for the rendering of animations in supported browsers.

@angular/platform-browser/testing

Supplies a testing module for the Angular platform-browser subsystem.

Primary entry point exports

NgModules

BrowserModule

Exports required infrastructure for all Angular apps. Included by default in all Angular apps created with the CLI new command. Re-exports CommonModule and ApplicationModule, making their exports and providers available to all apps.

HammerModule

Adds support for HammerJS.

Classes

By

Predicates for use with DebugElement's query functions.

DomSanitizer

DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing values to be safe to use in the different DOM contexts.

EventManager

An injectable service that provides event management for Angular through a browser plug-in.

HammerGestureConfig

An injectable HammerJS Manager for gesture recognition. Configures specific event recognition.

Meta

A service for managing HTML <meta> tags.

Title

A service that can be used to get and set the title of a current HTML document.

Functions

bootstrapApplication

Bootstraps an instance of an Angular application and renders a standalone component as the application's root component. More information about standalone components can be found in this guide.

createApplication

Create an instance of an Angular application without bootstrapping any components. This is useful for the situation where one wants to decouple application environment creation (a platform and associated injectors) from rendering components on a screen. Components can be subsequently bootstrapped on the returned ApplicationRef.

disableDebugTools

Disables Angular tools.

enableDebugTools

Enabled Angular debug tools that are accessible via your browser's developer console.

provideClientHydration

Sets up providers necessary to enable hydration functionality for the application. By default, the function enables the recommended set of features for the optimal performance for most of the applications. You can enable/disable features by passing special functions (from the HydrationFeatures set) as arguments to the provideClientHydration function.

provideProtractorTestingSupport

Returns a set of providers required to setup Testability for an application bootstrapped using the bootstrapApplication function. The set of providers is needed to support testing an application with Protractor (which relies on the Testability APIs to be present).

withNoDomReuse

Disables DOM nodes reuse during hydration. Effectively makes Angular re-render an application from scratch on the client.

withNoHttpTransferCache

Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the server and other one on the browser.

Structures

HydrationFeature

Helper type to represent a Hydration feature.

HydrationFeatureKind

The list of features as an enum to uniquely type each HydrationFeature.

SafeHtml

Marker interface for a value that's safe to use as HTML.

SafeResourceUrl

Marker interface for a value that's safe to use as a URL to load executable code from.

SafeScript

Marker interface for a value that's safe to use as JavaScript.

SafeStyle

Marker interface for a value that's safe to use as style (CSS).

SafeUrl

Marker interface for a value that's safe to use as a URL linking to a document.

SafeValue

Marker interface for a value that's safe to use in a particular context.

Types

ApplicationConfig

Deprecated: ApplicationConfig has moved, please import ApplicationConfig from @angular/core instead.

Set of config options available during the application bootstrap operation.

EVENT_MANAGER_PLUGINS

The injection token for the event-manager plug-in service.

HAMMER_GESTURE_CONFIG

DI token for providing HammerJS support to Angular.

HAMMER_LOADER

Injection token used to provide a HammerLoader to Angular.

HammerLoader

Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.

MetaDefinition

Represents the attributes of an HTML <meta> element. The element itself is represented by the internal HTMLMetaElement.

REMOVE_STYLES_ON_COMPONENT_DESTROY

A DI token that indicates whether styles of destroyed components should be removed from DOM.

StateKey

Deprecated: StateKey has moved, please import StateKey from @angular/core instead.

A type-safe key to use with TransferState.

TransferState

Deprecated: TransferState has moved, please import TransferState from @angular/core instead.

A key value store that is transferred from the application on the server side to the application on the client side.

makeStateKey

Deprecated: makeStateKey has moved, please import makeStateKey from @angular/core instead.

Create a StateKey<T> that can be used to store value of type T with TransferState.

platformBrowser

A factory function that returns a PlatformRef instance associated with browser service providers.

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/platform-browser