Im trying to convert this directive into a component in typescript. I saw a couple of videos and articles on how to do so, but most of them are in javascript so it is a bit unclear.
Here is the code:
export class TableRowBSGroupDirective implements ng.IDirective {
restrict: string = 'A';
scope: any = {
dirvm: '=',
grouplvl: '=',
classlvl: '@'
};
templateUrl: any = balanceSheetFSPolicy.dirvmConstant.TableRowGroupTmpl;
controller: any = ($scope: any) => {
balanceSheetFSPolicy.balanceSheetFSViewModel = $scope.dirvm;
$scope.balanceSheetFSPolicy = balanceSheetFSPolicy;
};
static factory(): ng.IDirectiveFactory {
const directive = function () {
return new TableRowBSGroupDirective();
};
return directive;
}
}
angular
.module('app.recon.statements')
.directive('tableRowBsGroup', TableRowBSGroupDirective.factory());