app.directive("myData", function()
{
return {
templateUrl: '/my-data.html'
};
});
my-data.html file code
<tr ng-repeat="employee in employees">
<td>{{employee.id}}</td>
<td>{{employee.name}}</td>
<td>{{employee.gender | uppercase }}</td>
<td>{{employee.salary | currency : '$'}}</td>
</tr>
<body ng-app="DemoAngular">
<div ng-controller="AngularController">
<table>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Gender</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<my-data></my-data>
</tbody>
</table>
</div>
</body>
Implementing a custom directive that assigns a template URL, using it in the table body within an Angular controller. However, despite setting everything up correctly, nothing is being populated or functioning as expected. Assistance required, thank you.