Before calling $on, I need to assign the value of
$scope.attestorObj.riskAssessmentRoleAsgnKey
to a global variable called roleAsgnKy
. I am new to angularJS and would appreciate any help on how to achieve this.
This is what I have tried so far...
In main.js:
var roleAsgnKy;
$scope.filesGridOptions = attestorConfig.getAttestorHistoryFile();
$scope.filesGridOptions.dataSourceattestorFactory.getFilesHistoryDataSource(roleAsgnKy);
$scope.$on('addEditAttest',function(s,attestorObj){
$scope.attestorObj = attestorObj;
$scope.attestorObj.riskAssessmentRoleAsgnKey = roleAsgnKy;
});