本文整理匯總了TypeScript中@angular/core.RendererV2類的典型用法代碼示例。如果您正苦於以下問題:TypeScript RendererV2類的具體用法?TypeScript RendererV2怎麽用?TypeScript RendererV2使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了RendererV2類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: listen
private listen(r: RendererV2, el: any, elName: string, eventName: string, unlistenId: number) {
const listener = (event: any) => {
return this._eventDispatcher.dispatchRenderEvent(el, elName, eventName, event);
};
const unlisten = r.listen(el || elName, eventName, listener);
this._renderStore.store(unlisten, unlistenId);
}
示例2: setProperty
private setProperty(r: RendererV2, el: any, name: string, value: any) {
r.setProperty(el, name, value);
}
示例3: setStyle
private setStyle(
r: RendererV2, el: any, style: string, value: any, hasVendorPrefix: boolean,
hasImportant: boolean) {
r.setStyle(el, style, value, hasVendorPrefix, hasImportant);
}
示例4: removeStyle
private removeStyle(r: RendererV2, el: any, style: string, hasVendorPrefix: boolean) {
r.removeStyle(el, style, hasVendorPrefix);
}
示例5: setAttribute
private setAttribute(r: RendererV2, el: any, name: string, value: string, namespace: string) {
r.setAttribute(el, name, value, namespace);
}
示例6: removeAttribute
private removeAttribute(r: RendererV2, el: any, name: string, namespace: string) {
r.removeAttribute(el, name, namespace);
}
示例7: parentNode
private parentNode(r: RendererV2, node: any, id: number) {
this._renderStore.store(r.parentNode(node), id);
}
示例8: nextSibling
private nextSibling(r: RendererV2, node: any, id: number) {
this._renderStore.store(r.nextSibling(node), id);
}
示例9: selectRootElement
private selectRootElement(r: RendererV2, selector: string, id: number) {
this._renderStore.store(r.selectRootElement(selector), id);
}
示例10: insertBefore
private insertBefore(r: RendererV2, parent: any, child: any, ref: any) {
r.insertBefore(parent, child, ref);
}