0

In my form page I have one Bootstrap glyphicon

<i class="glyphicon glyphicon-info-sign" title="" style="float:right; top:4px;"></i>

I want to set the value of ng-model="organization.orgName" inside title="" of the Bootstrap glyphicon. So that I can see the info when I am doing mouse over on this icon.

So please help me how can I do this. I am using AngularJS and Bootstrap v3.3.7.

user3441151
  • 1,880
  • 6
  • 35
  • 79

1 Answers1

0

Is pretty simple, just put the variable in angular expresion (interpolation) for title (PLUNKER):

CONTROLLER:

$scope.title = 'Info';

HTML:

<i class="glyphicon glyphicon-info-sign" title="{{myTitle}}"></i>

If you are using angular version >= 1.3 you can disable the two way data binding for better performance with this syntax: title="{{::myTitle}}"

The.Bear
  • 5,621
  • 2
  • 27
  • 33