本文整理匯總了TypeScript中angular2/core.ComponentRef類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ComponentRef類的具體用法?TypeScript ComponentRef怎麽用?TypeScript ComponentRef使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ComponentRef類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: appRefSyncRender
.then((appRef: ComponentRef) => {
let html = appRefSyncRender(appRef);
appRef.dispose();
return html;
});
示例2: deleteSet
export function deleteSet(element: ComponentRef, $array, $instance){
$array = _.reject($array, function (x) { return x.id == $instance.id});
element.dispose();
return $array;
}
示例3: applicationToString
export function applicationToString(appRef: ComponentRef): string {
let html = appRefSyncRender(appRef);
appRef.dispose();
return html;
}
示例4:
containerRef.instance.init(opts).subscribe(() => {
containerRef.dispose();
});
示例5: destroy
private destroy() {
this._backdropRef.destroy();
this.contentRef.destroy();
}
示例6:
instance.finally.subscribe((user) => {
chidRef.destroy();
this.user = user;
console.log('done');
})
示例7:
result.onDestroy(() => {
overlayRef.destroy();
});
示例8: dispose
private dispose() {
this._bootstrapRef.dispose();
this._backdropRef.dispose();
this.contentRef.dispose();
}
示例9: Dismiss
Dismiss(){
this.componentRef.dispose();
}