I have set date variable in "ng-init" directive and i want to add days to this date variable on every ng-repeat loop like below:
<table>
<tr ng-repeat="n in myArr" ng-init="myDate=('07/25/2017'|date:addDays($index))">
<td ng-bind="myDate"></td>
</tr>
</table
You can instantiate your first date in the controler like this :
And add days to it in the ngRepeat like this :
And if you want your date with the format mm/dd/yyyy, you need to add at the end of your ngInit
:'M/d/yyyy', like this (you can take a look at the doc for more information about date format) :But if you have other things to do with dates I think it could be a good idea to take a look at moment.js