I'm trying to deploy the popover using ember.js but not sure how to do it.
The contents of the popover must be an element of ember to interact with it.
I've been watching https://github.com/jzajpt/ember-bootstrap but does not include the popover element.
Any ideas? Thanks!
I think, what you try to do will never work, because if your mouse leaves the control, the popover will go away!
App.Popover = Ember.View.extend({
name: 'myPopover',
template: Ember.Handlebars.compile('<div class="popover" {{bindAttr name="name"}}><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title">test</h3><div class="popover-content"><p></p></div></div></div>')
});
App.TextField = Ember.TextField.extend({
didInsertElement: function() {
this._super();
var self = this;
Ember.run.schedule('actions', this, function() {
self.$().popover({
title: 'title',
content: 'content',
template: $('div[name="myPopover"]')
});
});
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With