This repository was archived by the owner on Nov 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,21 @@ using the `tooltip-view=""` attribute
120120``` html
121121<a href =" #" tooltips tooltip-title =" tip" tooltip-view =" path/to/view.html" >Tooltip me</a >
122122```
123+
124+ ####Tooltip view model
125+ You can set a model for your tooltip view
126+ using the ` tooltip-view-model="" `
127+
128+ ``` html
129+ <a href =" #" tooltips tooltip-title =" tip" tooltip-view-model =" myModel" tooltip-view =" path/to/view.html" >Tooltip me</a >
130+ ```
131+ then use it in your tooltip html template:
132+
133+ ``` html
134+ <!-- path/to/view.html -->
135+ <span >Tooltip me with data - {{ tooltipViewModel.myModel }}</span >
136+ ```
137+
123138####Tooltip view controller
124139You can set a controller for your tooltip view
125140using the ` tooltip-view="" ` together with ` tooltip-view-ctrl="" ` attribute
Original file line number Diff line number Diff line change 4444
4545 return {
4646 'restrict' : 'A' ,
47- 'scope' : { } ,
47+ 'scope' : {
48+ tooltipViewModel : '='
49+ } ,
4850 'link' : function linkingFunction ( $scope , element , attr ) {
4951
5052 var initialized = false
138140
139141 $scope . isTooltipEmpty = function checkEmptyTooltip ( ) {
140142
141- if ( ! $scope . title && ! $scope . content && ! $scope . html ) {
143+ if ( ! $scope . title && ! $scope . content && ! $scope . html && ! attr . tooltipView ) {
142144
143145 return true ;
144146 }
You can’t perform that action at this time.
0 commit comments