diff --git a/core/src/components/popover-controller/popover-controller.tsx b/core/src/components/popover-controller/popover-controller.tsx index 0d93235252..9c4eeb31c0 100644 --- a/core/src/components/popover-controller/popover-controller.tsx +++ b/core/src/components/popover-controller/popover-controller.tsx @@ -27,7 +27,7 @@ export class PopoverController implements OverlayController { removeLastOverlay(this.popovers); } - /* + /** * Create a popover overlay with popover options. */ @Method() @@ -35,7 +35,7 @@ export class PopoverController implements OverlayController { return createOverlay(this.doc.createElement('ion-popover'), opts); } - /* + /** * Dismiss the open popover overlay. */ @Method() @@ -43,7 +43,7 @@ export class PopoverController implements OverlayController { return dismissOverlay(data, role, this.popovers, popoverId); } - /* + /** * Get the most recently opened popover overlay. */ @Method() diff --git a/core/src/components/popover-controller/readme.md b/core/src/components/popover-controller/readme.md index 320a4c8227..7b278c70a2 100644 --- a/core/src/components/popover-controller/readme.md +++ b/core/src/components/popover-controller/readme.md @@ -2,18 +2,6 @@ Popover controllers programmatically control the popover component. Popovers can be created and dismissed from the popover controller. View the [Popover](../../popover/Popover) documentation for a full list of options to pass upon creation. -```javascript -async function presentPopover() { - const popoverController = document.querySelector('ion-popover-controller'); - await popoverController.componentOnReady(); - - const popoverElement = await popoverController.create({ - component: 'profile-page', - ev: event - }); - return await popoverElement.present(); -} -``` diff --git a/core/src/components/popover-controller/usage/javascript.md b/core/src/components/popover-controller/usage/javascript.md new file mode 100644 index 0000000000..a42c0f4b0e --- /dev/null +++ b/core/src/components/popover-controller/usage/javascript.md @@ -0,0 +1,12 @@ +```javascript +async function presentPopover() { + const popoverController = document.querySelector('ion-popover-controller'); + await popoverController.componentOnReady(); + + const popoverElement = await popoverController.create({ + component: 'profile-page', + ev: event + }); + return await popoverElement.present(); +} +```