title: AngularJs: Not able to clear input field after form sumbit
body: <p>Below is my angularjs code: I am not able to clear inputComment field after form submit. </p>
  
  <p>Here i am able to add record successfully but after adding record i am trying to clear the input field but i am not able to do it.</p>
  
  <pre><code>HTML code:
  &lt;body ng-app="taskDemo" ng-controller="taskController"&gt;
      &lt;div class="widget-body"&gt;
          &lt;form class="add-task" ng-if="addNewClicked" ng-init="addNewClicked=false;"&gt;
          &lt;div class=""&gt;
              &lt;div class="input-group"&gt;
                  &lt;input name="comment" ng-model="inputComment" type="text" class="form-control"   &gt; 
                      &lt;div class="input-group-btn"&gt;
                          &lt;button ng-click="addTask(inputComment)" type="submit" class="btn btn-default"&gt;
                              &lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt;&amp;nbsp;Add New Task
                          &lt;/button&gt;
                      &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  JS Code:
  &lt;script type="text/javascript" src="js/angular.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" &gt;
          app = angular.module('taskDemo', []);
          app.controller('taskController', function($scope, $http){
                  $scope.addTask = function (task) {
                  $http.post("ajax/addTask.php?task="+task)
                      .success(function ($response) {
                         getTaskList();                 
                      });
                   $scope.inputComment = '';  
  
              };
          }
      &lt;/script&gt;
  </code></pre>