title: AngularJS view doesn't update when replacing value
body: <p>I have the following html:</p>
  
  <pre><code>&lt;input type="text" ng-model="skype" ng-change="checkInput('skype')"&gt;
  </code></pre>
  
  <p>the function is:</p>
  
  <pre><code>$scope.checkInput = function(value) {
      var string = $scope[value],
          pattern = /[^a-zA-Z]+/g;
  
      string = string.replace(pattern, '');
  }
  </code></pre>
  
  <p>Now the console.log shows, that the string replaced successfully, however the view doesn't update.
  The strangest part is when using substring the view updates!</p>
  
  <pre><code>string = string.substring(0, 10);
  </code></pre>
  
  <p>What's wrong?</p>