jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › AngularJS › jqx-popover bug › Reply To: jqx-popover bug
The supported example is too simple.
It use just only one page.
Angularjs basically used for SPA.
Actually we can’t use such as examples.
We has A, B pages.
A page has popover.
B page doesn’t have any popover.
when some people click menu A and then click popover button, it normally show up popover at first.
And, click go on menu B(page B).
If we again click go menu A, and then click popover button, it has two popover object.
A main page has two ng-ui(or ui-view) view, jqx-popover has some problem.
I think that it append to body tag.
probably it doesn’t initialize object. So it increase same popover elements in body(every render times).
under code is the jqxpopover.js.
render: function () {
var that = this;
var contentId = that.element.id;
that._content.detach();
that._toggleElement = $(that.selector);
if (that._toggleElement.length === 0) {
throw new Error('jqxPopover: Invalid Popover toggler: "' + that.selector + '".');
} else if (that._toggleElement === null) {
throw new Error('jqxPopover: Missing Popover toggler.');
}
var template = $('<div id="' + contentId + '" class="' + that.toThemeProperty("jqx-popover") + '"><div class="' + that.toThemeProperty("jqx-popover-arrow") + '"></div><div class="' + that.toThemeProperty("jqx-popover-title") + '"></div><div class="' + that.toThemeProperty("jqx-popover-content") + '"></div></div>');
$("body").append(template);
When I use same code using angular-bootstrap popover, it perfectly work.