I have been experimenting with different methods to create a two-way binding between my directive and repeater, but so far I haven't been successful. Although I have tried various strategies suggested online, the current setup does not pass item.myDate to the template as required.
How can this be achieved?
HTML
<tr ng-repeat="item in items">
<td>
<mydirective dateModel="item.myDate"></mydirective>
</td>
</tr>
JS
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: "&"},
template:'<input class="date" ng-model="{{dateModel}}">',
};
});