ng-class dynamic doesn't change when resize window
<p>I tried the ng-class directive with a ternary and it works very well when the page load. My reference is the widthWindow.xs variable, it is "true" when the window size is a mobile, but there is a resize put it to "false" but the class does not change, the ng-class not dynamically changes. Why?</p>

<p>in the controller:</p>

<pre><code>$scope.myResize = funcion(){
   var number = $window.innerWidth;
   if (number &gt; 767) {
      $scope.widthWindow.xs = false;
   }else{
      $scope.widthWindow.xs = true;
   }
};
</code></pre>

<p>in the html:</p>

<pre><code>&lt;p ng-class="widthWindow.xs ? 'borderVoteNewsTop' : 'borderVoteNewsLeft'"&gt;Don't change when there is a resize&lt;/p&gt;
</code></pre>