I've been trying to get an Ember View as the content of a Boostrap popover where I can keep the bindings updating.
I was able to achieve this, you can check an example on this jsFiddle.
Unfortunately this solutions causes an irregular popover placement.
Can someone please check my code and see what I did wrong or if there's a simpler way to achieve this?
$popover.popover({
html: true,
placement:'bottom',
content: function(){
if(_this.get('childView')) {
_this.get('childView').remove();
}
var view = _this.container.lookup('view:popoverContent'),
childView = _this.createChildView(view),
popover = $popover.data('popover'),
$tip = popover.tip(),
$content = $tip.find('.popover-content');
_this.set('childView', childView);
childView.appendTo($content);
var html = $content.html();
return html;
}
});