lmo523
lmo523

Reputation: 489

Using angular to conditionally hide text content inside of bootstrap tooltip

I am using a bootsrap tooltip with a lot of dynamic content. I know you can use html inside the tooltip data-titlebut it seems like you can't use angular directives like ng-if

Is there a way to do something like:

        <i class="fa fa-question-circle editable-question" bs-tooltip data-

    html="true" data-title="<span ng-if='function == true'> {{obj.field}}
</span> other content that will always be here" >

I haven't been able to use ng-if inside of the data-title string.

What is the best way to conditionally hide/show some of the text content inside of a tooltip?

Upvotes: 0

Views: 1615

Answers (1)

Nick
Nick

Reputation: 1570

data-title="{{function ? obj.attr : '' }}"

Upvotes: 2

Related Questions