I am facing a challenge in my Angular application where I need to pass two variables to a template. Here is what I have been trying:
<div ng-include="'myTemplate.html'" onload="{obj: someObject, value: value}"></div>
Unfortunately, the above code snippet does not work as expected. I am struggling to find a way to successfully pass these two variables. The structure of my template is similar to the example below (I am aiming for a recursive effect).
<script type="text/ng-template" id="myTemplate.html">
<h2> {{obj.title}} </h2>
<h2> {{value}}-{{$parent.value}} </h2>
<div ng-include="'endpointTemplate.html'" onload="{obj: someObject.innerObjects, value: {{$parent.value + value}}"></div>
</script>
If you have any suggestions or ideas on how I can achieve this, please share them with me.