As a beginner in AngularJS and Javascript, I recently attempted to pass an object from one function to another.
Here is the HTML Code:
<div ng-click="getValueFromHtml(userObj)">send Object </div>
This is the Controller Code:
$scope.getValueFromHtml=function(userObj){
console.log(JSON.stringify(userObj)); //userObj is passed from the HTML
}
$scope.getUserObj=function(userObj){
console.log(userObj) //I want to utilize userObj here
}