javascript - Error displaying info on Tooltip with AngularStrap -
i trying display info in tooltip , getting title
and here html call it
<button class="btn btn-primary" type="button" ng-click="moreinfoslip(slip)" data-trigger="click" data-type="success" data-title="{{tooltip.title}}" bs-tooltip> click me </button>
and here js
$scope.moreinfoslip = function(slip) { console.log(slip); $scope.tooltip = { title: '<strong>pick info</strong>', content: '<div class="selection-info"><p><strong>game</strong> ' + slip.gamelineobj.name + '</p>' + '<p><strong>league</strong> ' + slip.leagueobj.name + '</p>' + '<p><strong>date</strong> ' + moment(slip.gamelineobj.date).format('mmmm yyyy, h:mm:ss a') + '</p>' + '<p><strong>line</strong> ' + _.result(_.find(slip.lines, {isselected: '1'}), 'pick') + '</p></div>' }; }
what doing wrong ?
you need set data-html="true"
attribute of tooltip.
<button class="btn btn-primary" type="button" ng-click="moreinfoslip(slip)" data-trigger="click" data-type="success" data-html="true" data-title="{{tooltip.title}}" bs-tooltip> click me </button>
Comments
Post a Comment