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
120
120
``` html
121
121
<a href =" #" tooltips tooltip-title =" tip" tooltip-view =" path/to/view.html" >Tooltip me</a >
122
122
```
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
+
123
138
####Tooltip view controller
124
139
You can set a controller for your tooltip view
125
140
using the ` tooltip-view="" ` together with ` tooltip-view-ctrl="" ` attribute
Original file line number Diff line number Diff line change 44
44
45
45
return {
46
46
'restrict' : 'A' ,
47
- 'scope' : { } ,
47
+ 'scope' : {
48
+ tooltipViewModel : '='
49
+ } ,
48
50
'link' : function linkingFunction ( $scope , element , attr ) {
49
51
50
52
var initialized = false
138
140
139
141
$scope . isTooltipEmpty = function checkEmptyTooltip ( ) {
140
142
141
- if ( ! $scope . title && ! $scope . content && ! $scope . html ) {
143
+ if ( ! $scope . title && ! $scope . content && ! $scope . html && ! attr . tooltipView ) {
142
144
143
145
return true ;
144
146
}
You can’t perform that action at this time.
0 commit comments