title: Not able to access $scope variable from within a controller function in Angular JS
body: <p>in the view I have:</p>
  
  <pre><code>&lt;div ng-controller="formCtrl"&gt;
      &lt;div class="alert alert-success" ng-show={{alert}}&gt;"hey"&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>my form:</p>
  
  <pre><code>  &lt;form name="myForm" ng-controller="formCtrl" ng-submit="submit()"&gt;...
  </code></pre>
  
  <p>on my controller, formCtrl, I have: </p>
  
  <pre><code>    $scope.submit = function($scope) {
  
       $http.post('/add', {brand: this.brand} ).success(function(data){
           this.alert = true;
        });
       //this.alert(true); &lt;-- also tried, did not work
    };
  </code></pre>
  
  <p>I want to be able to update the alert box when the form is submitted. </p>
  
  <p>So: click alert button on form
  then: form is submitted
  then: "alert" gets updated with either success or failure message</p>
  
  <p>I think I the scopes all mixed up. Not sure.</p>