@angular/platform-browser

  • Version 12.1.4
  • Published
  • 1.23 MB
  • 1 dependency
  • MIT license

Install

npm i @angular/platform-browser
yarn add @angular/platform-browser
pnpm add @angular/platform-browser

Overview

Angular - library for using Angular in a web browser

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable EVENT_MANAGER_PLUGINS

const EVENT_MANAGER_PLUGINS: any;
  • The injection token for the event-manager plug-in service.

variable HAMMER_GESTURE_CONFIG

const HAMMER_GESTURE_CONFIG: any;
  • DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.

    See Also

    • HammerGestureConfig

      HammerModule

variable HAMMER_LOADER

const HAMMER_LOADER: any;

variable ɵangular_packages_platform_browser_platform_browser_c

const ɵangular_packages_platform_browser_platform_browser_c: any[];

    variable ɵangular_packages_platform_browser_platform_browser_h

    const ɵangular_packages_platform_browser_platform_browser_h: any[];
    • In View Engine, support for Hammer gestures is built-in by default.

    variable ɵangular_packages_platform_browser_platform_browser_i

    const ɵangular_packages_platform_browser_platform_browser_i: any[];

      variable ɵangular_packages_platform_browser_platform_browser_l

      const ɵangular_packages_platform_browser_platform_browser_l: any[];

        variable ɵangular_packages_platform_browser_platform_browser_n

        const ɵangular_packages_platform_browser_platform_browser_n: any[];
        • Providers which support debugging Angular applications (e.g. via ng.probe).

        variable ɵBROWSER_SANITIZATION_PROVIDERS

        const ɵBROWSER_SANITIZATION_PROVIDERS: any[];
        • Replacing built-in sanitization providers exposes the application to XSS risks. Attacker-controlled data introduced by an unsanitized provider could expose your application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security).

        variable ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__

        const ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__: never[];

          variable ɵELEMENT_PROBE_PROVIDERS

          const ɵELEMENT_PROBE_PROVIDERS: any[];

            variable ɵELEMENT_PROBE_PROVIDERS__POST_R3__

            const ɵELEMENT_PROBE_PROVIDERS__POST_R3__: never[];
            • In Ivy, we don't support NgProbe because we have our own set of testing utilities with more robust functionality.

              We shouldn't bring in NgProbe because it prevents DebugNode and friends from tree-shaking properly.

            variable ɵHAMMER_PROVIDERS__POST_R3__

            const ɵHAMMER_PROVIDERS__POST_R3__: never[];
            • In Ivy, support for Hammer gestures is optional, so applications must import the HammerModule at root to turn on support. This means that Hammer-specific code can be tree-shaken away if not needed.

            variable ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS

            const ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS: any[];

              variable ɵNAMESPACE_URIS

              const ɵNAMESPACE_URIS: { [ns: string]: string };

                variable ɵTRANSITION_ID

                const ɵTRANSITION_ID: any;
                • An id that identifies a particular application being bootstrapped, that should match across the client/server boundary.

                variable VERSION

                const VERSION: any;

                Functions

                function disableDebugTools

                disableDebugTools: () => void;
                • Disables Angular tools.

                function enableDebugTools

                enableDebugTools: <T>(ref: any) => any;
                • Enabled Angular debug tools that are accessible via your browser's developer console.

                  Usage:

                  1. Open developer console (e.g. in Chrome Ctrl + Shift + j) 1. Type ng. (usually the console will show auto-complete suggestion) 1. Try the change detection profiler ng.profiler.timeChangeDetection() then hit Enter.

                function makeStateKey

                makeStateKey: <T = void>(key: string) => StateKey<T>;
                • Create a StateKey<T> that can be used to store value of type T with TransferState.

                  Example:

                  const COUNTER_KEY = makeStateKey<number>('counter');
                  let value = 10;
                  transferState.set(COUNTER_KEY, value);

                function ɵangular_packages_platform_browser_platform_browser_a

                ɵangular_packages_platform_browser_platform_browser_a: () => any;

                  function ɵangular_packages_platform_browser_platform_browser_b

                  ɵangular_packages_platform_browser_platform_browser_b: () => any;

                    function ɵangular_packages_platform_browser_platform_browser_d

                    ɵangular_packages_platform_browser_platform_browser_d: () => Meta;
                    • Factory to create a Meta service instance for the current DOM document.

                    function ɵangular_packages_platform_browser_platform_browser_e

                    ɵangular_packages_platform_browser_platform_browser_e: () => Title;
                    • Factory to create Title service.

                    function ɵangular_packages_platform_browser_platform_browser_f

                    ɵangular_packages_platform_browser_platform_browser_f: (
                    doc: Document,
                    appId: string
                    ) => TransferState;

                      function ɵangular_packages_platform_browser_platform_browser_j

                      ɵangular_packages_platform_browser_platform_browser_j: (
                      injector: any
                      ) => ɵDomSanitizerImpl;

                        function ɵangular_packages_platform_browser_platform_browser_k

                        ɵangular_packages_platform_browser_platform_browser_k: (
                        transitionId: string,
                        document: any,
                        injector: any
                        ) => () => void;

                          function ɵangular_packages_platform_browser_platform_browser_m

                          ɵangular_packages_platform_browser_platform_browser_m: (
                          coreTokens: NgProbeToken[]
                          ) => any;

                            function ɵescapeHtml

                            ɵescapeHtml: (text: string) => string;

                              function ɵflattenStyles

                              ɵflattenStyles: (
                              compId: string,
                              styles: Array<any | any[]>,
                              target: string[]
                              ) => string[];

                                function ɵinitDomAdapter

                                ɵinitDomAdapter: () => void;

                                  function ɵshimContentAttribute

                                  ɵshimContentAttribute: (componentShortId: string) => string;

                                    function ɵshimHostAttribute

                                    ɵshimHostAttribute: (componentShortId: string) => string;

                                      function platformBrowser

                                      platformBrowser: (extraProviders?: StaticProvider[]) => any;
                                      • A factory function that returns a PlatformRef instance associated with browser service providers.

                                      Classes

                                      class BrowserModule

                                      class 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.

                                      constructor

                                      constructor(parentModule: BrowserModule);

                                        method withServerTransition

                                        static withServerTransition: (params: { appId: string }) => any;
                                        • Configures a browser-based app to transition from a server-rendered app, if one is present on the page.

                                          Parameter params

                                          An object containing an identifier for the app to transition. The ID must match between the client and server versions of the app.

                                          Returns

                                          The reconfigured BrowserModule to import into the app's root AppModule.

                                        class BrowserTransferStateModule

                                        class BrowserTransferStateModule {}
                                        • NgModule to install on the client side while using the TransferState to transfer state from server to client.

                                        class By

                                        class By {}

                                        method all

                                        static all: () => any;
                                        • Match all nodes.

                                          ### Example

                                        method css

                                        static css: (selector: string) => any;
                                        • Match elements by the given CSS selector.

                                          ### Example

                                        method directive

                                        static directive: (type: any) => any;
                                        • Match nodes that have the given directive present.

                                          ### Example

                                        class DomSanitizer

                                        abstract class DomSanitizer implements Sanitizer {}
                                        • DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing values to be safe to use in the different DOM contexts.

                                          For example, when binding a URL in an <a [href]="someValue"> hyperlink, someValue will be sanitized so that an attacker cannot inject e.g. a javascript: URL that would execute code on the website.

                                          In specific situations, it might be necessary to disable sanitization, for example if the application genuinely needs to produce a javascript: style link with a dynamic value in it. Users can bypass security by constructing a value with one of the bypassSecurityTrust... methods, and then binding to that value from the template.

                                          These situations should be very rare, and extraordinary care must be taken to avoid creating a Cross Site Scripting (XSS) security bug!

                                          When using bypassSecurityTrust..., make sure to call the method as early as possible and as close as possible to the source of the value, to make it easy to verify no security bug is created by its use.

                                          It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous code. The sanitizer leaves safe values intact.

                                          Calling any of the bypassSecurityTrust... APIs disables Angular's built-in sanitization for the value passed in. Carefully check and audit all values and code paths going into this call. Make sure any user data is appropriately escaped for this security context. For more detail, see the [Security Guide](https://g.co/ng/security).

                                        method bypassSecurityTrustHtml

                                        abstract bypassSecurityTrustHtml: (value: string) => SafeHtml;
                                        • Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML is unsafe (e.g. contains <script> tags) and the code should be executed. The sanitizer will leave safe HTML intact, so in most situations this method should not be used.

                                          **WARNING:** calling this method with untrusted user data exposes your application to XSS security risks!

                                        method bypassSecurityTrustResourceUrl

                                        abstract bypassSecurityTrustResourceUrl: (value: string) => SafeResourceUrl;
                                        • Bypass security and trust the given value to be a safe resource URL, i.e. a location that may be used to load executable code from, like <script src>, or <iframe src>.

                                          **WARNING:** calling this method with untrusted user data exposes your application to XSS security risks!

                                        method bypassSecurityTrustScript

                                        abstract bypassSecurityTrustScript: (value: string) => SafeScript;
                                        • Bypass security and trust the given value to be safe JavaScript.

                                          **WARNING:** calling this method with untrusted user data exposes your application to XSS security risks!

                                        method bypassSecurityTrustStyle

                                        abstract bypassSecurityTrustStyle: (value: string) => SafeStyle;
                                        • Bypass security and trust the given value to be safe style value (CSS).

                                          **WARNING:** calling this method with untrusted user data exposes your application to XSS security risks!

                                        method bypassSecurityTrustUrl

                                        abstract bypassSecurityTrustUrl: (value: string) => SafeUrl;
                                        • Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used in hyperlinks or <img src>.

                                          **WARNING:** calling this method with untrusted user data exposes your application to XSS security risks!

                                        method sanitize

                                        abstract sanitize: (
                                        context: any,
                                        value: SafeValue | string | null
                                        ) => string | null;
                                        • Sanitizes a value for use in the given SecurityContext.

                                          If value is trusted for the context, this method will unwrap the contained safe value and use it directly. Otherwise, value will be sanitized to be safe in the given context, for example by replacing URLs that have an unsafe protocol part (such as javascript:). The implementation is responsible to make sure that the value can definitely be safely used in the given context.

                                        class EventManager

                                        class EventManager {}
                                        • An injectable service that provides event management for Angular through a browser plug-in.

                                        constructor

                                        constructor(
                                        plugins: ɵangular_packages_platform_browser_platform_browser_g[],
                                        _zone: any
                                        );
                                        • Initializes an instance of the event-manager service.

                                        method addEventListener

                                        addEventListener: (
                                        element: HTMLElement,
                                        eventName: string,
                                        handler: Function
                                        ) => Function;
                                        • Registers a handler for a specific element and event.

                                          Parameter element

                                          The HTML element to receive event notifications.

                                          Parameter eventName

                                          The name of the event to listen for.

                                          Parameter handler

                                          A function to call when the notification occurs. Receives the event object as an argument.

                                          Returns

                                          A callback function that can be used to remove the handler.

                                        method addGlobalEventListener

                                        addGlobalEventListener: (
                                        target: string,
                                        eventName: string,
                                        handler: Function
                                        ) => Function;
                                        • Registers a global handler for an event in a target view.

                                          Parameter target

                                          A target for global event notifications. One of "window", "document", or "body".

                                          Parameter eventName

                                          The name of the event to listen for.

                                          Parameter handler

                                          A function to call when the notification occurs. Receives the event object as an argument.

                                          Returns

                                          A callback function that can be used to remove the handler.

                                          Deprecated

                                          No longer being used in Ivy code. To be removed in version 14.

                                        method getZone

                                        getZone: () => any;
                                        • Retrieves the compilation zone in which event listeners are registered.

                                        class HammerGestureConfig

                                        class HammerGestureConfig {}
                                        • An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) for gesture recognition. Configures specific event recognition.

                                        property events

                                        events: string[];
                                        • A set of supported event names for gestures to be used in Angular. Angular supports all built-in recognizers, as listed in [HammerJS documentation](https://hammerjs.github.io/).

                                        property options

                                        options?: {
                                        cssProps?: any;
                                        domEvents?: boolean;
                                        enable?: boolean | ((manager: any) => boolean);
                                        preset?: any[];
                                        touchAction?: string;
                                        recognizers?: any[];
                                        inputClass?: any;
                                        inputTarget?: EventTarget;
                                        };
                                        • Properties whose default values can be overridden for a given event. Different sets of properties apply to different events. For information about which properties are supported for which events, and their allowed and default values, see [HammerJS documentation](https://hammerjs.github.io/).

                                        property overrides

                                        overrides: { [key: string]: Object };
                                        • Maps gesture event names to a set of configuration options that specify overrides to the default values for specific properties.

                                          The key is a supported event name to be configured, and the options object contains a set of properties, with override values to be applied to the named recognizer event. For example, to disable recognition of the rotate event, specify {"rotate": {"enable": false}}.

                                          Properties that are not present take the HammerJS default values. For information about which properties are supported for which events, and their allowed and default values, see [HammerJS documentation](https://hammerjs.github.io/).

                                        method buildHammer

                                        buildHammer: (element: HTMLElement) => HammerInstance;
                                        • Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) and attaches it to a given HTML element.

                                          Parameter element

                                          The element that will recognize gestures.

                                          Returns

                                          A HammerJS event-manager object.

                                        class HammerModule

                                        class HammerModule {}
                                        • Adds support for HammerJS.

                                          Import this module at the root of your application so that Angular can work with HammerJS to detect gesture events.

                                          Note that applications still need to include the HammerJS script itself. This module simply sets up the coordination layer between HammerJS and Angular's EventManager.

                                        class Meta

                                        class Meta {}
                                        • A service for managing HTML <meta> tags.

                                          Properties of the MetaDefinition object match the attributes of the HTML <meta> tag. These tags define document metadata that is important for things like configuring a Content Security Policy, defining browser compatibility and security settings, setting HTTP Headers, defining rich content for social sharing, and Search Engine Optimization (SEO).

                                          To identify specific <meta> tags in a document, use an attribute selection string in the format "tag_attribute='value string'". For example, an attrSelector value of "name='description'" matches a tag whose name attribute has the value "description". Selectors are used with the querySelector() Document method, in the format meta[{attrSelector}].

                                          See Also

                                          • [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)

                                          • [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)

                                        constructor

                                        constructor(_doc: any);

                                          method addTag

                                          addTag: (tag: MetaDefinition, forceCreation?: boolean) => HTMLMetaElement | null;
                                          • Retrieves or creates a specific <meta> tag element in the current HTML document. In searching for an existing tag, Angular attempts to match the name or property attribute values in the provided tag definition, and verifies that all other attribute values are equal. If an existing element is found, it is returned and is not modified in any way.

                                            Parameter tag

                                            The definition of a <meta> element to match or create.

                                            Parameter forceCreation

                                            True to create a new element without checking whether one already exists.

                                            Returns

                                            The existing element with the same attributes and values if found, the new element if no match is found, or null if the tag parameter is not defined.

                                          method addTags

                                          addTags: (tags: MetaDefinition[], forceCreation?: boolean) => HTMLMetaElement[];
                                          • Retrieves or creates a set of <meta> tag elements in the current HTML document. In searching for an existing tag, Angular attempts to match the name or property attribute values in the provided tag definition, and verifies that all other attribute values are equal.

                                            Parameter tags

                                            An array of tag definitions to match or create.

                                            Parameter forceCreation

                                            True to create new elements without checking whether they already exist.

                                            Returns

                                            The matching elements if found, or the new elements.

                                          method getTag

                                          getTag: (attrSelector: string) => HTMLMetaElement | null;
                                          • Retrieves a <meta> tag element in the current HTML document.

                                            Parameter attrSelector

                                            The tag attribute and value to match against, in the format "tag_attribute='value string'".

                                            Returns

                                            The matching element, if any.

                                          method getTags

                                          getTags: (attrSelector: string) => HTMLMetaElement[];
                                          • Retrieves a set of <meta> tag elements in the current HTML document.

                                            Parameter attrSelector

                                            The tag attribute and value to match against, in the format "tag_attribute='value string'".

                                            Returns

                                            The matching elements, if any.

                                          method removeTag

                                          removeTag: (attrSelector: string) => void;
                                          • Removes an existing <meta> tag element from the current HTML document.

                                            Parameter attrSelector

                                            A tag attribute and value to match against, to identify an existing tag. A string in the format "tag_attribute=value string".

                                          method removeTagElement

                                          removeTagElement: (meta: HTMLMetaElement) => void;
                                          • Removes an existing <meta> tag element from the current HTML document.

                                            Parameter meta

                                            The tag definition to match against to identify an existing tag.

                                          method updateTag

                                          updateTag: (tag: MetaDefinition, selector?: string) => HTMLMetaElement | null;
                                          • Modifies an existing <meta> tag element in the current HTML document.

                                            Parameter tag

                                            The tag description with which to replace the existing tag content.

                                            Parameter selector

                                            A tag attribute and value to match against, to identify an existing tag. A string in the format "tag_attribute=value string". If not supplied, matches a tag with the same name or property attribute value as the replacement tag. The modified element.

                                          class ɵangular_packages_platform_browser_platform_browser_g

                                          abstract class ɵangular_packages_platform_browser_platform_browser_g {}

                                            constructor

                                            constructor(_doc: any);

                                              property manager

                                              manager: EventManager;

                                                method addEventListener

                                                abstract addEventListener: (
                                                element: HTMLElement,
                                                eventName: string,
                                                handler: Function
                                                ) => Function;

                                                  method addGlobalEventListener

                                                  addGlobalEventListener: (
                                                  element: string,
                                                  eventName: string,
                                                  handler: Function
                                                  ) => Function;

                                                    method supports

                                                    abstract supports: (eventName: string) => boolean;

                                                      class ɵangular_packages_platform_browser_platform_browser_o

                                                      class ɵangular_packages_platform_browser_platform_browser_o implements XhrFactory {}
                                                      • A factory for HttpXhrBackend that uses the XMLHttpRequest browser API.

                                                      method build

                                                      build: () => XMLHttpRequest;

                                                        class ɵangular_packages_platform_browser_platform_browser_p

                                                        abstract class ɵangular_packages_platform_browser_platform_browser_p extends ɵDomAdapter {}
                                                        • Provides DOM operations in any browser environment.

                                                          Tread carefully! Interacting with the DOM directly is dangerous and can introduce XSS risks.

                                                        property supportsDOMEvents

                                                        readonly supportsDOMEvents: boolean;

                                                          class ɵBrowserDomAdapter

                                                          class ɵBrowserDomAdapter extends ɵangular_packages_platform_browser_platform_browser_p {}
                                                          • A DomAdapter powered by full browser DOM APIs.

                                                            Tread carefully! Interacting with the DOM directly is dangerous and can introduce XSS risks.

                                                          method createElement

                                                          createElement: (tagName: string, doc?: Document) => HTMLElement;

                                                            method createHtmlDocument

                                                            createHtmlDocument: () => HTMLDocument;

                                                              method dispatchEvent

                                                              dispatchEvent: (el: Node, evt: any) => void;

                                                                method getBaseHref

                                                                getBaseHref: (doc: Document) => string | null;

                                                                  method getCookie

                                                                  getCookie: (name: string) => string | null;

                                                                    method getDefaultDocument

                                                                    getDefaultDocument: () => Document;

                                                                      method getGlobalEventTarget

                                                                      getGlobalEventTarget: (doc: Document, target: string) => EventTarget | null;
                                                                      • Deprecated

                                                                        No longer being used in Ivy code. To be removed in version 14.

                                                                      method getUserAgent

                                                                      getUserAgent: () => string;

                                                                        method isElementNode

                                                                        isElementNode: (node: Node) => boolean;

                                                                          method isShadowRoot

                                                                          isShadowRoot: (node: any) => boolean;

                                                                            method makeCurrent

                                                                            static makeCurrent: () => void;

                                                                              method onAndCancel

                                                                              onAndCancel: (el: Node, evt: any, listener: any) => Function;

                                                                                method remove

                                                                                remove: (node: Node) => void;

                                                                                  method resetBaseElement

                                                                                  resetBaseElement: () => void;

                                                                                    class ɵBrowserGetTestability

                                                                                    class ɵBrowserGetTestability implements GetTestability {}

                                                                                      method addToWindow

                                                                                      addToWindow: (registry: any) => void;

                                                                                        method findTestabilityInTree

                                                                                        findTestabilityInTree: (
                                                                                        registry: any,
                                                                                        elem: any,
                                                                                        findInAncestors: boolean
                                                                                        ) => Testability | null;

                                                                                          method init

                                                                                          static init: () => void;

                                                                                            class ɵDomEventsPlugin

                                                                                            class ɵDomEventsPlugin extends ɵangular_packages_platform_browser_platform_browser_g {}

                                                                                              constructor

                                                                                              constructor(doc: any);

                                                                                                method addEventListener

                                                                                                addEventListener: (
                                                                                                element: HTMLElement,
                                                                                                eventName: string,
                                                                                                handler: Function
                                                                                                ) => Function;

                                                                                                  method removeEventListener

                                                                                                  removeEventListener: (
                                                                                                  target: any,
                                                                                                  eventName: string,
                                                                                                  callback: Function
                                                                                                  ) => void;

                                                                                                    method supports

                                                                                                    supports: (eventName: string) => boolean;

                                                                                                      class ɵDomRendererFactory2

                                                                                                      class ɵDomRendererFactory2 implements RendererFactory2 {}

                                                                                                        constructor

                                                                                                        constructor(
                                                                                                        eventManager: EventManager,
                                                                                                        sharedStylesHost: ɵDomSharedStylesHost,
                                                                                                        appId: string
                                                                                                        );

                                                                                                          method begin

                                                                                                          begin: () => void;

                                                                                                            method createRenderer

                                                                                                            createRenderer: (element: any, type: RendererType2 | null) => any;

                                                                                                              method end

                                                                                                              end: () => void;

                                                                                                                class ɵDomSanitizerImpl

                                                                                                                class ɵDomSanitizerImpl extends DomSanitizer {}

                                                                                                                  constructor

                                                                                                                  constructor(_doc: any);

                                                                                                                    method bypassSecurityTrustHtml

                                                                                                                    bypassSecurityTrustHtml: (value: string) => SafeHtml;

                                                                                                                      method bypassSecurityTrustResourceUrl

                                                                                                                      bypassSecurityTrustResourceUrl: (value: string) => SafeResourceUrl;

                                                                                                                        method bypassSecurityTrustScript

                                                                                                                        bypassSecurityTrustScript: (value: string) => SafeScript;

                                                                                                                          method bypassSecurityTrustStyle

                                                                                                                          bypassSecurityTrustStyle: (value: string) => SafeStyle;

                                                                                                                            method bypassSecurityTrustUrl

                                                                                                                            bypassSecurityTrustUrl: (value: string) => SafeUrl;

                                                                                                                              method sanitize

                                                                                                                              sanitize: (ctx: any, value: SafeValue | string | null) => string | null;

                                                                                                                                class ɵDomSharedStylesHost

                                                                                                                                class ɵDomSharedStylesHost extends ɵSharedStylesHost implements OnDestroy {}

                                                                                                                                  constructor

                                                                                                                                  constructor(_doc: any);

                                                                                                                                    method addHost

                                                                                                                                    addHost: (hostNode: Node) => void;

                                                                                                                                      method ngOnDestroy

                                                                                                                                      ngOnDestroy: () => void;

                                                                                                                                        method onStylesAdded

                                                                                                                                        onStylesAdded: (additions: Set<string>) => void;

                                                                                                                                          method removeHost

                                                                                                                                          removeHost: (hostNode: Node) => void;

                                                                                                                                            class ɵHammerGesturesPlugin

                                                                                                                                            class ɵHammerGesturesPlugin extends ɵangular_packages_platform_browser_platform_browser_g {}
                                                                                                                                            • Event plugin that adds Hammer support to an application.

                                                                                                                                              HammerModule

                                                                                                                                            constructor

                                                                                                                                            constructor(
                                                                                                                                            doc: any,
                                                                                                                                            _config: HammerGestureConfig,
                                                                                                                                            console: any,
                                                                                                                                            loader?: HammerLoader
                                                                                                                                            );

                                                                                                                                              method addEventListener

                                                                                                                                              addEventListener: (
                                                                                                                                              element: HTMLElement,
                                                                                                                                              eventName: string,
                                                                                                                                              handler: Function
                                                                                                                                              ) => Function;

                                                                                                                                                method isCustomEvent

                                                                                                                                                isCustomEvent: (eventName: string) => boolean;

                                                                                                                                                  method supports

                                                                                                                                                  supports: (eventName: string) => boolean;

                                                                                                                                                    class ɵKeyEventsPlugin

                                                                                                                                                    class ɵKeyEventsPlugin extends ɵangular_packages_platform_browser_platform_browser_g {}
                                                                                                                                                    • A browser plug-in that provides support for handling of key events in Angular.

                                                                                                                                                    constructor

                                                                                                                                                    constructor(doc: any);
                                                                                                                                                    • Initializes an instance of the browser plug-in.

                                                                                                                                                      Parameter doc

                                                                                                                                                      The document in which key events will be detected.

                                                                                                                                                    method addEventListener

                                                                                                                                                    addEventListener: (
                                                                                                                                                    element: HTMLElement,
                                                                                                                                                    eventName: string,
                                                                                                                                                    handler: Function
                                                                                                                                                    ) => Function;
                                                                                                                                                    • Registers a handler for a specific element and key event.

                                                                                                                                                      Parameter element

                                                                                                                                                      The HTML element to receive event notifications.

                                                                                                                                                      Parameter eventName

                                                                                                                                                      The name of the key event to listen for.

                                                                                                                                                      Parameter handler

                                                                                                                                                      A function to call when the notification occurs. Receives the event object as an argument.

                                                                                                                                                      Returns

                                                                                                                                                      The key event that was registered.

                                                                                                                                                    method eventCallback

                                                                                                                                                    static eventCallback: (fullKey: any, handler: Function, zone: any) => Function;
                                                                                                                                                    • Configures a handler callback for a key event.

                                                                                                                                                      Parameter fullKey

                                                                                                                                                      The event name that combines all simultaneous keystrokes.

                                                                                                                                                      Parameter handler

                                                                                                                                                      The function that responds to the key event.

                                                                                                                                                      Parameter zone

                                                                                                                                                      The zone in which the event occurred.

                                                                                                                                                      Returns

                                                                                                                                                      A callback function.

                                                                                                                                                    method getEventFullKey

                                                                                                                                                    static getEventFullKey: (event: KeyboardEvent) => string;

                                                                                                                                                      method parseEventName

                                                                                                                                                      static parseEventName: (
                                                                                                                                                      eventName: string
                                                                                                                                                      ) => { fullKey: string; domEventName: string } | null;

                                                                                                                                                        method supports

                                                                                                                                                        supports: (eventName: string) => boolean;
                                                                                                                                                        • Reports whether a named key event is supported.

                                                                                                                                                          Parameter eventName

                                                                                                                                                          The event name to query. True if the named key event is supported.

                                                                                                                                                        class ɵSharedStylesHost

                                                                                                                                                        class ɵSharedStylesHost {}

                                                                                                                                                          method addStyles

                                                                                                                                                          addStyles: (styles: string[]) => void;

                                                                                                                                                            method getAllStyles

                                                                                                                                                            getAllStyles: () => string[];

                                                                                                                                                              method onStylesAdded

                                                                                                                                                              onStylesAdded: (additions: Set<string>) => void;

                                                                                                                                                                class Title

                                                                                                                                                                class Title {}
                                                                                                                                                                • A service that can be used to get and set the title of a current HTML document.

                                                                                                                                                                  Since an Angular application can't be bootstrapped on the entire HTML document (<html> tag) it is not possible to bind to the text property of the HTMLTitleElement elements (representing the <title> tag). Instead, this service can be used to set and get the current title value.

                                                                                                                                                                constructor

                                                                                                                                                                constructor(_doc: any);

                                                                                                                                                                  method getTitle

                                                                                                                                                                  getTitle: () => string;
                                                                                                                                                                  • Get the title of the current HTML document.

                                                                                                                                                                  method setTitle

                                                                                                                                                                  setTitle: (newTitle: string) => void;
                                                                                                                                                                  • Set the title of the current HTML document.

                                                                                                                                                                    Parameter newTitle

                                                                                                                                                                  class TransferState

                                                                                                                                                                  class TransferState {}
                                                                                                                                                                  • A key value store that is transferred from the application on the server side to the application on the client side.

                                                                                                                                                                    TransferState will be available as an injectable token. To use it import ServerTransferStateModule on the server and BrowserTransferStateModule on the client.

                                                                                                                                                                    The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only boolean, number, string, null and non-class objects will be serialized and deserialized in a non-lossy manner.

                                                                                                                                                                  method get

                                                                                                                                                                  get: <T>(key: StateKey<T>, defaultValue: T) => T;
                                                                                                                                                                  • Get the value corresponding to a key. Return defaultValue if key is not found.

                                                                                                                                                                  method hasKey

                                                                                                                                                                  hasKey: <T>(key: StateKey<T>) => boolean;
                                                                                                                                                                  • Test whether a key exists in the store.

                                                                                                                                                                  method onSerialize

                                                                                                                                                                  onSerialize: <T>(key: StateKey<T>, callback: () => T) => void;
                                                                                                                                                                  • Register a callback to provide the value for a key when toJson is called.

                                                                                                                                                                  method remove

                                                                                                                                                                  remove: <T>(key: StateKey<T>) => void;
                                                                                                                                                                  • Remove a key from the store.

                                                                                                                                                                  method set

                                                                                                                                                                  set: <T>(key: StateKey<T>, value: T) => void;
                                                                                                                                                                  • Set the value corresponding to a key.

                                                                                                                                                                  method toJson

                                                                                                                                                                  toJson: () => string;
                                                                                                                                                                  • Serialize the current state of the store to JSON.

                                                                                                                                                                  Interfaces

                                                                                                                                                                  interface SafeHtml

                                                                                                                                                                  interface SafeHtml extends SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use as HTML.

                                                                                                                                                                  interface SafeResourceUrl

                                                                                                                                                                  interface SafeResourceUrl extends SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use as a URL to load executable code from.

                                                                                                                                                                  interface SafeScript

                                                                                                                                                                  interface SafeScript extends SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use as JavaScript.

                                                                                                                                                                  interface SafeStyle

                                                                                                                                                                  interface SafeStyle extends SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use as style (CSS).

                                                                                                                                                                  interface SafeUrl

                                                                                                                                                                  interface SafeUrl extends SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use as a URL linking to a document.

                                                                                                                                                                  interface SafeValue

                                                                                                                                                                  interface SafeValue {}
                                                                                                                                                                  • Marker interface for a value that's safe to use in a particular context.

                                                                                                                                                                  Type Aliases

                                                                                                                                                                  type HammerLoader

                                                                                                                                                                  type HammerLoader = () => Promise<void>;
                                                                                                                                                                  • Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.

                                                                                                                                                                  type MetaDefinition

                                                                                                                                                                  type MetaDefinition = {
                                                                                                                                                                  charset?: string;
                                                                                                                                                                  content?: string;
                                                                                                                                                                  httpEquiv?: string;
                                                                                                                                                                  id?: string;
                                                                                                                                                                  itemprop?: string;
                                                                                                                                                                  name?: string;
                                                                                                                                                                  property?: string;
                                                                                                                                                                  scheme?: string;
                                                                                                                                                                  url?: string;
                                                                                                                                                                  } & {
                                                                                                                                                                  [prop: string]: string;
                                                                                                                                                                  };
                                                                                                                                                                  • Represents the attributes of an HTML <meta> element. The element itself is represented by the internal HTMLMetaElement.

                                                                                                                                                                    See Also

                                                                                                                                                                    • [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)

                                                                                                                                                                    • Meta

                                                                                                                                                                  type StateKey

                                                                                                                                                                  type StateKey<T> = string & {
                                                                                                                                                                  __not_a_string: never;
                                                                                                                                                                  };
                                                                                                                                                                  • A type-safe key to use with TransferState.

                                                                                                                                                                    Example:

                                                                                                                                                                    const COUNTER_KEY = makeStateKey<number>('counter');
                                                                                                                                                                    let value = 10;
                                                                                                                                                                    transferState.set(COUNTER_KEY, value);

                                                                                                                                                                  Package Files (1)

                                                                                                                                                                  Dependencies (1)

                                                                                                                                                                  Dev Dependencies (0)

                                                                                                                                                                  No dev dependencies.

                                                                                                                                                                  Peer Dependencies (3)

                                                                                                                                                                  Badge

                                                                                                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@angular/platform-browser.

                                                                                                                                                                  • Markdown
                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@angular/platform-browser)
                                                                                                                                                                  • HTML
                                                                                                                                                                    <a href="https://www.jsdocs.io/package/@angular/platform-browser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>