I use custom AngularJs directive for create bootstrap popover but when make popover popover content can't change and it's fix .
app.directive('nextLevel', function () {
return {
restrict: 'EA',
template: '<a ui-sref="register" tabindex="0" linkdisabled="{{type}}"
class="btn btn-block btn-success ng-class: {disabled: !(type)}" role="button" >next</a>',
link: function (scope, el, attrs){
$(el).popover({
trigger: 'click',
html: true,
toggle:'popover',
title: 'notice !!',
content: attrs.popoverHtml,
placement: 'top'
});
}
};
});
my html is :
<next-level id='pop' popover-html='{{typeMessage}}'></next-level>
typeMessage should be change depending on user behavior but it's only show initial message and not change content when popover open .
You should isolate the scope with '@' binding inorder to reflect the change
Update:
Plunker
When you click on radio button, pop over will disappear and pop over content will be updated.