Can someone explain why the input with ng-model in this plunk is not updated when the button is pressed?
http://plnkr.co/edit/8JpyUVM8dY8aoV4fi5hC?p=preview
HTML
<body ng-controller="MainCtrl">
Using ng-model: <input type="text" ng-model="myDate"><br/>
Using expression: {{ myDate }}<br/>
<button ng-click="nextDay()">Next Day</button>
</body>
JS
app.controller('MainCtrl', function($scope) {
$scope.myDate = new Date();
$scope.nextDay = function(){
$scope.myDate.setDate($scope.myDate.getDate() + 1);
};
});