title: angularjs ng-click can't change $scope variable?
body: <p>I'm baffled here I've got a controller which looks like this..</p>
  
  <pre><code>angular.module('publicRegApp')
    .controller('CompanyNameController', function ($scope) {
      $scope.title = 'Title One';
  
      $scope.onSearch = function(){
          console.log("clicked");
          $scope.title = "Title Two";
      }
  
    });
  </code></pre>
  
  <p>in my template I have:</p>
  
  <pre><code>&lt;button type="submit" class="btn btn-default" ng-click="onSearch()"&gt;Search&lt;/button&gt;
  </code></pre>
  
  <p>When I click the button the console log gets fired but the $scope.title doesn't change. I'm so confused please help :-(</p>