Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Add option to use templateUrl in column defintions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Hinsch authored and Lukas Hinsch committed Jan 7, 2016
1 parent e5c80f4 commit a7ee818
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/mindsmash-angular-uxtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,12 +908,13 @@

// ===== INTERNAL

.directive('uxTableCell', ['$compile', function($compile) {
.directive('uxTableCell', ['$compile', '$templateCache', function($compile, $templateCache) {
return {
scope: false,
require: '^uxTableView',
link: function($scope, elem, attrs) {
var template = $scope.column.template;
var template = $scope.column.template || 
(angular.isString($scope.column.templateUrl) ? $templateCache.get($scope.column.templateUrl) : null);
if (angular.isString(template)) {
elem.html($compile(template)($scope));
}
Expand Down
Loading

0 comments on commit a7ee818

Please sign in to comment.