admin管理员组文章数量:1360344
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: ''};
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: ''};
Share
Improve this question
edited Sep 19, 2016 at 7:06
Thomas
182k56 gold badges378 silver badges504 bronze badges
asked Sep 19, 2016 at 7:05
FabianFabian
31 gold badge1 silver badge3 bronze badges
3
-
is
tooltip
a directive? – brk Commented Sep 19, 2016 at 7:07 -
Wele to SO! You can format your code by indenting it with four spaces, or just select it and click the
{}
button. – Thomas 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" – amdev Commented Sep 19, 2016 at 7:28
2 Answers
Reset to default 6The 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"'>
You can try matTooltip as:
<input type="text" ng-model="DiskPermissions" class="col-md-3 m-x-auto" matTooltip='Permissions "Disk"'>
本文标签: javascriptAdding tooltip at inputangular jsStack Overflow
版权声明:本文标题:javascript - Adding tooltip at input, angular js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743894224a2557489.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论