Having issues with my editPrcChallenge
function. I am broadcasting the challengekey
in order to route the user to a child state, but for some reason it's not entering the function. Any thoughts on what might be wrong with my implementation?
This is what I've tried so far...
In parent.js:
$scope.editPrcChallenge = function (challengeKey) {
$scope.$broadcast('editPrcChallenge', challengeKey);
$state.go('app.editChallenge',{processId:$stateParams.processId, challengeKey: challengeKey});
};
In child.js:
$scope.$on('editPrcChallenge', function (s, challengeKey){
console.log(challengeKey);
$scope.editMode = true;
// $scope.clearFields = clearForm();
processFactory.getProcessChallengeInfo(challengeKey)
.then(function(response){
$scope.challengesDTO = response.data;
$scope.showEscalation = !!$scope.challengesDTO.challengeDesLkupCode;
});
};