diff --git a/packages/primeng/src/drawer/drawer.ts b/packages/primeng/src/drawer/drawer.ts index baa3739c586..82d1d2b27fd 100755 --- a/packages/primeng/src/drawer/drawer.ts +++ b/packages/primeng/src/drawer/drawer.ts @@ -402,7 +402,7 @@ export class Drawer extends BaseComponent implements AfterViewInit, OnDestroy { appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/menu/menu.ts b/packages/primeng/src/menu/menu.ts index 082e35e5313..fe58f69fb31 100755 --- a/packages/primeng/src/menu/menu.ts +++ b/packages/primeng/src/menu/menu.ts @@ -519,7 +519,7 @@ export class Menu extends BaseComponent implements OnDestroy { appendOverlay() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/overlaypanel/overlaypanel.ts b/packages/primeng/src/overlaypanel/overlaypanel.ts index efc3593cfad..85567395764 100755 --- a/packages/primeng/src/overlaypanel/overlaypanel.ts +++ b/packages/primeng/src/overlaypanel/overlaypanel.ts @@ -316,7 +316,7 @@ export class OverlayPanel extends BaseComponent implements AfterContentInit, OnD appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/popover/popover.ts b/packages/primeng/src/popover/popover.ts index 220c90b95a4..3a18a66e4c5 100755 --- a/packages/primeng/src/popover/popover.ts +++ b/packages/primeng/src/popover/popover.ts @@ -282,7 +282,7 @@ export class Popover extends BaseComponent implements OnDestroy { appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/sidebar/sidebar.ts b/packages/primeng/src/sidebar/sidebar.ts index bac3df51643..43035c6bdfe 100755 --- a/packages/primeng/src/sidebar/sidebar.ts +++ b/packages/primeng/src/sidebar/sidebar.ts @@ -377,7 +377,7 @@ export class Sidebar extends BaseComponent implements AfterViewInit, AfterConten appendContainer() { if (this.appendTo) { - return this.appendTo === 'body' ? this.renderer.appendChild(this.document.body, this.container) : appendChild(this.container, this.appendTo); + return this.appendTo === 'body' ? this.renderer.appendChild(this.document.body, this.container) : appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/tieredmenu/tieredmenu.ts b/packages/primeng/src/tieredmenu/tieredmenu.ts index bf1d87ba52e..ec65a03f7c0 100755 --- a/packages/primeng/src/tieredmenu/tieredmenu.ts +++ b/packages/primeng/src/tieredmenu/tieredmenu.ts @@ -972,7 +972,7 @@ export class TieredMenu extends BaseComponent implements OnInit, OnDestroy { appendOverlay() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } }