title: Clear value inside a text box in AngularJS without manipulating data in ng-model
body: <p>I have a form for password updation.
  HTML :</p>
  
  <pre><code>&lt;div class="profile-fields"&gt;
  
                  &lt;p&gt;Please provide your profile details&lt;/p&gt;
  
                  &lt;div class="field"&gt;
                      &lt;label for="username"&gt;User Name&lt;/label&gt;
                      &lt;input type="text" name="username" value="" placeholder="UserName" ng-model="profile.name" ng-disabled="true" /&gt;
                  &lt;/div&gt;
  
                  &lt;div class="field"&gt;
                      &lt;label for="password"&gt;Password:&lt;/label&gt;
                      &lt;input type="password" name="password"  placeholder="Password" ng-model="profile.password" value="" validator="required" required-error-message="Password is required" valid-method="watch" /&gt;
                  &lt;/div&gt;
                  &lt;div class="field"&gt;
                      &lt;label for="password"&gt;Retype Password:&lt;/label&gt;
                      &lt;input type="password" name="password1" value="" placeholder="Password" ng-model="password1" validator="required" required-error-message="Password is required" valid-method="watch" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>The new password is sent from the first password box using <code>ng-model="profile.password"</code></p>
  
  <p>Controller :</p>
  
  <pre><code>myApp.controller('profileController', ['$scope', 'userResolved', 'userServices', '$location', function ($scope, userResolved, userServices, $location) {
  
      $scope.oldPassword = userResolved.data.password;
      $scope.profile = userResolved.data;
  $scope.cancelProfile = function () {
  
  
          $location.path("/dashboard");
  
  
      }
      $scope.updateProfile = function () {
  
          if ($scope.profileForm.$valid &amp;&amp; $scope.profile.password == $scope.password1) {
              if ($scope.profile.password != $scope.oldPassword) {
                  userServices.saveProfile($scope.profile).then(function (result) {
                      if (!result.error) {
                          alert("Profile updated!!! Please login again with new password.");
                          $location.path("/logout");
                      }
                  })
                  .catch(function (data) {
                      $scope.error = data.data;
                  });
              }
              else {
                  $scope.error = "Password cannot be same as before!!"
  
              }
  
          }
          else {
              $scope.error = "Passwords mismatch!!"
          }
      };
  }]);
  </code></pre>
  
  <p>The problem is that on page load the model is displaying the current password in the first password text box. User will have to manually clear the current password from the first textbox to enter the new one. I can't just clear the <code>profile.password</code> because I am using it for validation. Is there anyway we can clear the value inside the element on page load in a way that we are not manipulating ng-model?</p>
  
  <p>The text box should not display the current password on page load. How can I achieve this?</p>