Add tableActions component
Creating a separate table actions component to allow
row action customizations like disabling certain
actions and rendering different icons.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I85e96045af27701f5ecc4af9bf824e248abccbf5
diff --git a/app/common/directives/icon-provider.js b/app/common/directives/icon-provider.js
index 5554fdd..bee6150 100644
--- a/app/common/directives/icon-provider.js
+++ b/app/common/directives/icon-provider.js
@@ -13,8 +13,9 @@
angular.module('app.common.directives').directive('icon', () => {
return {
- restrict: 'E', link: (scope, element, attrs) => {
- const file = attrs.file;
+ restrict: 'E',
+ link: (scope, element, attrs) => {
+ const file = attrs.file || attrs.ngFile;
if (file === undefined) {
console.log('File name not provided for <icon> directive.')
return;
@@ -23,6 +24,6 @@
element.html(svg);
element.addClass('icon');
}
- }
+ };
})
})(window.angular);
\ No newline at end of file