@angular/platform-browser

Supports delivery 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.

入口点

主要

@angular/platform-browser

Supports delivery of Angular apps on different supported browsers.

次要

@angular/platform-browser/animations
@angular/platform-browser/testing

主入口点的导出

模块

BrowserModule

导出所有 Angular 应用都需要的基础设施。默认包含在用 CLI 的 new 命令创建的所有 Angular 应用中。 它二次导出了 CommonModuleApplicationModule,以便它们的导出物和提供商能用于所有应用中。

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

BrowserTransferStateModule

NgModule to install on the client side while using the TransferState to transfer state from server to client.

By

Predicates for use with DebugElement's query functions.

DomSanitizer

DomSanitizer 可以把值净化为在不同 DOM 上下文中的安全内容,来帮你防范跨站脚本攻击(XSS)类的安全问题。

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 that can be used to get and add meta tags.

Title

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

TransferState

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

函数

disableDebugTools

Disables Angular tools.

enableDebugTools

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

makeStateKey

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

结构

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.

类型

DOCUMENT

已废弃: import from @angular/common instead.

A DI Token representing the main rendering context. In a browser this is the DOM Document.

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 HammerLoaderto Angular.

HammerLoader

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

MetaDefinition

Represents a meta element.

StateKey

A type-safe key to use with TransferState.

platformBrowser