0
我打電話給工廠之前,我們打電話$,是否有辦法分配$scope.attestorObj.riskAssessmentRoleAsgnKey
到roleAsgnKy
值是全局變量。新的angularJS任何幫助將不勝感激。
到目前爲止已經試過代碼...
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;
});
目前還不清楚你想要做什麼...你想使scope.attestorObj.riskAssessmentRoleAsgnKey成爲一個全局變量而不是侷限於它的當前範圍? –
是的,這是正確的。 – aftab