When ng-repeat is having dynamic ng-include with variables, it is not taking variables properly.
See this plunker.
main html code
<table style>
<tr>
<th>Student</th>
<th>Teacher</th>
</tr>
<tbody ng-repeat="val in data">
<tr>
<td>
<div ng-include src="'profile.html'" onLoad="profile=val.student"></div>
</td>
<td>
<div ng-include src="'profile.html'" onLoad="profile=val.teacher"></div>
</td>
</tr>
</tbody>
</table>
profile.html code
<span>Id - {{profile.id}}</span>
<span>Name - {{profile.name}}</span>
You can see at link without ng-include it works perfect.
P.S. This is prototype of what I am actually trying to achieve. Mainly I am having problem with variables used in dynamic ng-include present in ng-repeat.
I have checked similar questions like below but not getting any answers.