Popover not working properly
-
When i am trying to add popover got below error
Cannot read property ‘show’ of null
Sharing code below:
<ons-button id=“popover-target”>Popover Target</ons-button>
<ons-popover>
This is a popover!
</ons-popover>var target = document.querySelector("#popover-target")
document.querySelector(“ons-popover”).show(target)
-
@shweta Your
document.querySelector(“ons-popover”)
is not finding any element. Make sure the popover is attached to the DOM when you run that.