I have recently developed a custom directive that I am utilizing in my template:
<data-input> </data-input>
Within my directive (dataInput), the associated template (data-input.html) contains the following HTML code:
<input ng-change="dataChanged()" ... > ...
Additionally, in the JavaScript file, the function is defined as follows:
scope.dataChanged= function(){ //change the data }
Everything functions smoothly, however, I am now facing the challenge of saving the modified data to a variable in my controller, which operates within a separate scope. The template containing
<data-input> </data-input>
belongs to the final scope that I am attempting to access.
I have attempted to pass it via parameters, but unfortunately, this approach was not successful. Any advice or suggestions would be greatly appreciated.