One of my function expressions looks like this:
$scope.myCourse = function(param1, param2) {
$scope.courseName = param2;
$scope.courseType = param1
}
I am trying to access the variable/data from $scope.myCourse
in another function expression as shown below:
$scope.updateCourse = function() {
// How can I access/use $scope.courseName and $scope.courseType from $scope.myCourse here?
}
However, I keep getting 'undefined' when attempting to do so:
$scope.updateCourse = function() {
console.log($scope.courseName, 'and', $scope.courseType, 'are in current selection. Are you fine to change the COURSE and TYPE?')
}