1

I have a set of multiple forms to send message. Each form name starting with a fixed name like "uploadForm_" and ends with a unique id. Final name will be shows as name = "uploadForm_{{id}}"

When i access the form i have a scope variable set with the name uploadForm_xYzerty:{data}

I need to access this scope after some click event on the form

View

<form id="uploadForm_{{id}}" name="uploadForm_{{id}}">
<input ng-model="file" name="file" ng-click="getPreviousValue(id)"/>
</form>

Controller

$scope.getPreviousValue = function(id){
 // id = 'abcd123'
 // access it form scope->uploadForm_abcd123
}

0 Answers0