title: AngularJS change body width according to page innerWidth
body: <p>I would like to make my page scrollable.</p>
  
  <p>Therfore i need to add width element on top of the body.</p>
  
  <p>if i will do width:100%; the scroller will never show, so i'm looking for a simple solution to sample to page width and set it to the body when it changes.</p>
  
  <p>i have two issues:</p>
  
  <ol>
  <li>i can't make it work.</li>
  <li>the watch only fires when the app loaded and not every time the window width changes.</li>
  </ol>
  
  <p>This is the code i used:</p>
  
  <pre><code>   $scope.$watch(function(){
              return $window.innerWidth;
          }, function(value) {
              $scope.cols = value;
              var width = value +'px !important';
  
              $('body').css("width", width);
          });
  </code></pre>