0

I have the following Problem: I have an input field, but it only works without the tooltip, with the tooltip I get undefined.

HTML:

<input type="text" ng-model="DiskPermissions" class="col-md-3 m-x-auto" tooltip='Permissions "Disk"'>
<input type="text" ng-model="DiskPermissions" class="col-md-3 m-x-auto">

Controller:

var diskToAdd={ size: $scope.DiskSizeGB , mountepoint:'/appl/' + $scope.MountPoint , permissions: $scope.DiskPermissions , options: $scope.DiskOptions , owner: $scope.DiskOwner , filesystemType: $scope.DiskFilesystemtype , diskPart: ''};
3
  • is tooltip a directive? Commented Sep 19, 2016 at 7:07
  • Welcome to SO! You can format your code by indenting it with four spaces, or just select it and click the {} button. Commented Sep 19, 2016 at 7:15
  • I'm not sure of what is tooltip ( if its your own directive or a tierce js lib ) but you can add the module 'ui.bootstrap' which provide very nice tooltip and use it with these directives : tooltip-placement="top-right" uib-tooltip="I'm a tooltip" Commented Sep 19, 2016 at 7:28

2 Answers 2

6

The attribute isn't called tooltip, it's called title:

<input type="text" ng-model="DiskPermissions" class="col-md-3 m-x-auto" title='Permissions "Disk"'>
Sign up to request clarification or add additional context in comments.

6 Comments

On my page it is called tooltip
So is it a directive?
its the html tooltip attribute. And if i have the tooltip attribute I can see it, so that works, but somehow the ng-model is undefined if i use the tooltip ;(
As far as I'm aware, there is no such thing as a "HTML tooltip attribute". The attribute used for displaying tooltips is called title.
hmm ok now i get your first answer. I will try it out with title.
|
1

You can try matTooltip as:

<input type="text" ng-model="DiskPermissions" class="col-md-3 m-x-auto" matTooltip='Permissions "Disk"'>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.