Skip to content

Commit

Permalink
add data links config
Browse files Browse the repository at this point in the history
  • Loading branch information
esvit committed Oct 27, 2013
1 parent 763d0fd commit c9812f4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ng-table-export.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ng-table-export.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ng-table-export.src.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
angular.module('ngTableExport', [])
.directive('exportCsv', function ($parse) {
.config(['$compileProvider', function($compileProvider) {
// allow data links
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|data):/);
}])
.directive('exportCsv', ['$parse', function ($parse) {
return {
restrict: 'A',
scope: false,
Expand Down Expand Up @@ -41,4 +45,4 @@ angular.module('ngTableExport', [])
$parse(attrs.exportCsv).assign(scope.$parent, csv);
}
};
});
}]);
8 changes: 6 additions & 2 deletions src/scripts/00-directive.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
angular.module('ngTableExport', [])
.directive('exportCsv', function ($parse) {
.config(['$compileProvider', function($compileProvider) {
// allow data links
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|data):/);
}])
.directive('exportCsv', ['$parse', function ($parse) {
return {
restrict: 'A',
scope: false,
Expand Down Expand Up @@ -41,4 +45,4 @@ angular.module('ngTableExport', [])
$parse(attrs.exportCsv).assign(scope.$parent, csv);
}
};
});
}]);

0 comments on commit c9812f4

Please sign in to comment.