ngx-dynamic-hooks
Version:
Automatically insert live Angular components into a dynamic string of content (based on their selector or any pattern of your choice) and render the result in the DOM.
40 lines (39 loc) • 2 kB
TypeScript
import { CompletePlatformService, PlatformService } from './platformService';
import { DefaultPlatformService } from './defaultPlatformService';
import * as i0 from "@angular/core";
/**
* Wrapper class that either calls user-provided PlatformService methods or falls back to default implementations
*/
export declare class AutoPlatformService implements CompletePlatformService {
private userPlatformService;
private defaultPlatformService;
constructor(userPlatformService: PlatformService, defaultPlatformService: DefaultPlatformService);
private getFor;
getNgVersion(): number | null;
sanitize(content: string): string;
createElement(tagName: string): any;
sortElements(a: any, b: any): number;
cloneElement(element: any): any;
getTagName(element: any): string;
getOpeningTag(element: any): string;
getClosingTag(element: any): string;
getAttributeNames(element: any): string[];
getAttribute(element: any, attributeName: string): string | null;
setAttribute(element: any, attributeName: string, value: string): void;
removeAttribute(element: any, attributeName: string): void;
getParentNode(element: any): any;
querySelectorAll(parentElement: any, selector: string): any[];
getChildNodes(node: any): any[];
appendChild(parentElement: any, childElement: any): void;
insertBefore(parentElement: any, childElement: any, referenceElement: any): void;
clearChildNodes(element: any): void;
removeChild(parentElement: any, childElement: any): void;
getInnerContent(element: any): string;
setInnerContent(element: any, content: string): void;
isTextNode(element: any): boolean;
createTextNode(content: string): any;
getTextContent(element: any): string | null;
dispatchEvent(element: any, name: string, payload: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<AutoPlatformService, [{ optional: true; }, null]>;
static ɵprov: i0.ɵɵInjectableDeclaration<AutoPlatformService>;
}