title: How to detect changes with Date objects in Angular2?
body: <p>Date objects that are modified using setDate method arent getting updated in template.</p>
  
  <p>In template:</p>
  
  <pre><code>&lt;p&gt;{{date | date:'mediumDate'}}&lt;/p&gt;
  </code></pre>
  
  <p>In component:</p>
  
  <pre><code>  nextDay(){
      this.date.setDate(this.date.getDate()+1);
    }
  </code></pre>
  
  <p>But when I call nextDay function, the template isnt updated with the new  value.</p>
  
  <p>The only way I could get the change detection working was doing this:</p>
  
  <pre><code>  nextDay(){
      var tomorrow = new Date();
      tomorrow.setDate(this.date.getDate()+1);
      this.date = tomorrow;
    }
  </code></pre>
  
  <p>Are there a better way to accomplish this same task?</p>