Javascript 将指令重新生成angularJS中的组件
我试图把这个指令转换成一个组件,但我不知道该怎么做Javascript 将指令重新生成angularJS中的组件,javascript,angularjs,typescript,components,Javascript,Angularjs,Typescript,Components,我试图把这个指令转换成一个组件,但我不知道该怎么做 export class TableRowBSHeaderDirective implements ng.IDirective { restrict: string = 'A'; templateUrl: any = balanceSheetFSPolicy.dirvmConstant.TableRowHeaderTmpl; controller: any = ($scope: any) => {
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());
可能重复的也可能重复的