i am trying to push a new template into my DOM, but every time i get copy of my previous template. How to push a new copy of template
$scope.addNew = function (personalDetail) {
$scope.personalDetails.push({
'add_template': '<div my-custom-row-template> </div>',
});
};
$scope.conditions = [];
$scope.conditions.push('myCustomRowTemplate');
$scope.addCondition = function () {
$scope.conditions.push('myCustomRowTemplate');
};
This is how its being rendered in the HTML File.
<tr ng-repeat="personalDetail in personalDetails">
<td scope="col">
<input type="checkbox" ng-model="personalDetail.selected"/>
</td>
<td scope="col" class="col-xs-10">
<div ng-repeat="condition_set in conditions track by $index" my-custom-row-template></div>
</td>
</td>
<td scope="col">
<input type="button" value="Add Condition" ng-click="addCondition()"
class="btn btn-primary addnew"/>
</td>
</tr>