2021-06-28 13:54:20 -04:00
|
|
|
## API Report File for "@angular/platform-browser"
|
|
|
|
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
import { ComponentRef } from '@angular/core';
|
|
|
|
import { DebugElement } from '@angular/core';
|
|
|
|
import { DebugNode } from '@angular/core';
|
|
|
|
import { InjectionToken } from '@angular/core';
|
|
|
|
import { ModuleWithProviders } from '@angular/core';
|
|
|
|
import { NgZone } from '@angular/core';
|
|
|
|
import { PlatformRef } from '@angular/core';
|
|
|
|
import { Predicate } from '@angular/core';
|
|
|
|
import { Sanitizer } from '@angular/core';
|
|
|
|
import { SecurityContext } from '@angular/core';
|
|
|
|
import { StaticProvider } from '@angular/core';
|
|
|
|
import { Type } from '@angular/core';
|
|
|
|
import { Version } from '@angular/core';
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export class BrowserModule {
|
2018-05-09 19:49:39 -04:00
|
|
|
constructor(parentModule: BrowserModule | null);
|
2018-10-19 09:37:01 -04:00
|
|
|
static withServerTransition(params: {
|
2017-02-22 19:06:21 -05:00
|
|
|
appId: string;
|
2018-07-09 14:36:30 -04:00
|
|
|
}): ModuleWithProviders<BrowserModule>;
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class BrowserTransferStateModule {
|
2017-09-11 03:18:55 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class By {
|
2019-06-14 07:12:34 -04:00
|
|
|
static all(): Predicate<DebugNode>;
|
2016-06-22 17:56:10 -04:00
|
|
|
static css(selector: string): Predicate<DebugElement>;
|
2019-06-14 07:12:34 -04:00
|
|
|
static directive(type: Type<any>): Predicate<DebugNode>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function disableDebugTools(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class DomSanitizer implements Sanitizer {
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract bypassSecurityTrustHtml(value: string): SafeHtml;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract bypassSecurityTrustScript(value: string): SafeScript;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract bypassSecurityTrustStyle(value: string): SafeStyle;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract bypassSecurityTrustUrl(value: string): SafeUrl;
|
2017-04-14 17:40:56 -04:00
|
|
|
abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const EVENT_MANAGER_PLUGINS: InjectionToken<ɵangular_packages_platform_browser_platform_browser_g[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class EventManager {
|
2020-02-26 12:09:35 -05:00
|
|
|
constructor(plugins: ɵangular_packages_platform_browser_platform_browser_g[], _zone: NgZone);
|
2016-06-22 17:56:10 -04:00
|
|
|
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated
|
|
|
|
addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
|
2016-06-22 17:56:10 -04:00
|
|
|
getZone(): NgZone;
|
2021-06-28 13:54:20 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const HAMMER_LOADER: InjectionToken<HammerLoader>;
|
2018-05-16 13:00:33 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class HammerGestureConfig {
|
|
|
|
buildHammer(element: HTMLElement): HammerInstance;
|
2016-06-22 17:56:10 -04:00
|
|
|
events: string[];
|
2018-02-01 20:08:17 -05:00
|
|
|
options?: {
|
|
|
|
cssProps?: any;
|
|
|
|
domEvents?: boolean;
|
|
|
|
enable?: boolean | ((manager: any) => boolean);
|
|
|
|
preset?: any[];
|
|
|
|
touchAction?: string;
|
|
|
|
recognizers?: any[];
|
|
|
|
inputClass?: any;
|
|
|
|
inputTarget?: EventTarget;
|
|
|
|
};
|
2016-06-22 17:56:10 -04:00
|
|
|
overrides: {
|
|
|
|
[key: string]: Object;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type HammerLoader = () => Promise<void>;
|
2018-05-16 13:00:33 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class HammerModule {
|
2019-08-19 23:00:26 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function makeStateKey<T = void>(key: string): StateKey<T>;
|
2017-09-11 03:18:55 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class Meta {
|
2017-02-14 19:14:40 -05:00
|
|
|
constructor(_doc: any);
|
2017-03-24 12:59:41 -04:00
|
|
|
addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null;
|
2016-12-08 21:44:28 -05:00
|
|
|
addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[];
|
2017-03-24 12:59:41 -04:00
|
|
|
getTag(attrSelector: string): HTMLMetaElement | null;
|
2016-12-08 21:44:28 -05:00
|
|
|
getTags(attrSelector: string): HTMLMetaElement[];
|
|
|
|
removeTag(attrSelector: string): void;
|
|
|
|
removeTagElement(meta: HTMLMetaElement): void;
|
2017-03-24 12:59:41 -04:00
|
|
|
updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null;
|
2016-12-08 21:44:28 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type MetaDefinition = {
|
2016-12-08 21:44:28 -05:00
|
|
|
charset?: string;
|
|
|
|
content?: string;
|
|
|
|
httpEquiv?: string;
|
|
|
|
id?: string;
|
|
|
|
itemprop?: string;
|
|
|
|
name?: string;
|
|
|
|
property?: string;
|
|
|
|
scheme?: string;
|
|
|
|
url?: string;
|
2017-02-08 22:50:16 -05:00
|
|
|
} & {
|
2016-12-08 21:44:28 -05:00
|
|
|
[prop: string]: string;
|
2017-02-08 22:50:16 -05:00
|
|
|
};
|
2016-12-08 21:44:28 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
|
2016-07-25 08:47:16 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeHtml extends SafeValue {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeResourceUrl extends SafeValue {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeScript extends SafeValue {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeStyle extends SafeValue {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeUrl extends SafeValue {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SafeValue {
|
2017-04-14 17:40:56 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type StateKey<T> = string & {
|
2017-09-11 03:18:55 -04:00
|
|
|
__not_a_string: never;
|
|
|
|
};
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class Title {
|
2017-02-14 19:14:40 -05:00
|
|
|
constructor(_doc: any);
|
2016-06-22 17:56:10 -04:00
|
|
|
getTitle(): string;
|
|
|
|
setTitle(newTitle: string): void;
|
|
|
|
}
|
2016-11-30 16:52:08 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class TransferState {
|
2017-09-11 03:18:55 -04:00
|
|
|
get<T>(key: StateKey<T>, defaultValue: T): T;
|
|
|
|
hasKey<T>(key: StateKey<T>): boolean;
|
|
|
|
onSerialize<T>(key: StateKey<T>, callback: () => T): void;
|
|
|
|
remove<T>(key: StateKey<T>): void;
|
|
|
|
set<T>(key: StateKey<T>, value: T): void;
|
|
|
|
toJson(): string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const VERSION: Version;
|
|
|
|
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
|
|
|
```
|