Bootstrap Popovers with ember.js template

后端 未结 5 1863
礼貌的吻别
礼貌的吻别 2021-02-06 08:44

I\'m trying to use Bootstrap Popover with EmberJS, so that the content of the popover will be a ember/handlebars template (with binding etc). How can this be done? (Ember 1.0.0-

5条回答
  •  野性不改
    2021-02-06 09:26

    ex if you want to popup a image do something like this in you view

    imgTag: 'Smiley face',
    
    didInsertElement: function () {
        var self = this;
        Ember.run.schedule('actions', this, function () {
            self.$().popover({
                title: 'Smile!!!',
                html: true,
                content: self.get('imgTag'),
                placement: 'bottom',
                trigger: 'hover'
            });
        });
    },
    
    willDestroyElement: function () {
        this.$().popover('destroy');
    }
    

提交回复
热议问题