File

src/dialog/dialog-placeholder.component.ts

Description

Deprecated as of v2.0, will be removed with v3.0 Using a dialog (popover, tooltip, etc) with appendToBody="true" in your application requires this component (n-dialog-placeholder). It would generally be placed near the end of your app component template (app.component.ts or app.component.html) as:

 * ...
 * <ibm-dialog-placeholder></ibm-dialog-placeholder>
 *

A more complete example for Popover is given as follows:

 * <button [ibmPopover]="Hello" appendToBody="true"></button>
 * ...
 * <ibm-dialog-placeholder></ibm-dialog-placeholder>
 *

Implements

OnInit

Example

Metadata

selector ibm-dialog-placeholder
template
<div #dialogPlaceholder></div>

Index

Properties
Methods

Constructor

constructor(placeholderService: PlaceholderService)

Creates an instance of DialogPlaceholder.

Parameters :
Name Type Optional
placeholderService PlaceholderService No

Methods

ngOnInit
ngOnInit()

Initializes the component using PlaceholderService.

Returns : void

Properties

Public placeholderService
placeholderService: PlaceholderService
Type : PlaceholderService
viewContainerRef
viewContainerRef: ViewContainerRef
Type : ViewContainerRef
Decorators :
@ViewChild('dialogPlaceholder', {read: ViewContainerRef})

Maintains a reference to the view DOM element of the DialogPlaceholder.

import {
	Component,
	OnInit,
	ViewContainerRef,
	ViewChild
} from "@angular/core";
import { PlaceholderService } from "./../placeholder/placeholder.module";

/**
 * Deprecated as of v2.0, will be removed with v3.0
 * Using a dialog (popover, tooltip, etc) with appendToBody="true" in your application
 * requires *this* component (`n-dialog-placeholder`).
 * It would generally be placed near the end of your app component template
 * (app.component.ts or app.component.html) as:
 *
 * ```html
 * ...
 * <ibm-dialog-placeholder></ibm-dialog-placeholder>
 * ```
 *
 * A more complete example for `Popover` is given as follows:
 *
 * ```html
 * <button [ibmPopover]="Hello" appendToBody="true"></button>
 * ...
 * <ibm-dialog-placeholder></ibm-dialog-placeholder>
 * ```
 *
 * @deprecated
 */
@Component({
	selector: "ibm-dialog-placeholder",
	template: `<div #dialogPlaceholder></div>`
})
export class DialogPlaceholder implements OnInit {
	/**
	 * Maintains a reference to the view DOM element of the `DialogPlaceholder`.
	 */
	@ViewChild("dialogPlaceholder", { read: ViewContainerRef }) viewContainerRef: ViewContainerRef;

	/**
	 * Creates an instance of `DialogPlaceholder`.
	 */
	constructor(public placeholderService: PlaceholderService) { }

	/**
	 * Initializes the component using `PlaceholderService`.
	 */
	ngOnInit() {
		console.warn("`ibm-dialog-placeholder` has been deprecated in favour of `ibm-placeholder`");
		this.placeholderService.registerViewContainerRef(this.viewContainerRef);
	}
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""