Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 1 | import IDirective = angular.IDirective; |
2 | export function xosLinkWrapper(): IDirective { | ||||
3 | return { | ||||
4 | template: ` | ||||
Matteo Scandolo | a242c87 | 2017-01-12 15:13:00 -0800 | [diff] [blame^] | 5 | <a ng-if="col.link" ui-sref="{{col.link(item)}}"> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 6 | <div ng-transclude></div> |
7 | </a> | ||||
8 | <div ng-transclude ng-if="!col.link"></div> | ||||
9 | `, | ||||
10 | restrict: 'A', | ||||
11 | transclude: true | ||||
12 | }; | ||||
13 | }; |