我试图将此指令转换为组件,但我不知道如何去做。
export class TableRowBSHeaderDirective implements ng.IDirective {
restrict: string = 'A';
templateUrl: any = balanceSheetFSPolicy.dirvmConstant.TableRowHeaderTmpl;
controller: any = ($scope: any) => {
balanceSheetFSPolicy.balanceSheetFSViewModel = $scope.bsFsVm;
$scope.balanceSheetFSPolicy = balanceSheetFSPolicy;
};
static factory(): ng.IDirectiveFactory {
const directive = function () {
return new TableRowBSHeaderDirective();
};
return directive;
}
}
angular
.module('app.recon.statements')
.directive('tableRowBsHeader', TableRowBSHeaderDirective.factory());