How to set blank or null value of input field on back button press in angularjs

Could you please tell me how to set blank or null value for an <input> field so it is blank when I press the back button press in AngularJS?

I will explain my question:

  • When I run index.html file, it shows one form.
  • I fill name :"naveen" and password :"sharma" and click "Forget password".
  • It still show sign up page
  • When I click the back button ("present on top header or square one"), it shows the first page again - i.e. the login page with same (original) entry values name ="naveen" and password =`"sharma".

I need to reset these fields i.e. means it shows blank or null..

Here is my code:

function authenticationCntrl($scope,$state,Auth) {
    $scope.user = [];


    console.log('=====authenticationCntrl controller call')
    console.log($scope.user.username)
    console.log($scope.user.password)
    $scope.forgetPassword = function () {
        if($scope.user.username==Auth.username && $scope.user.password==Auth.password ){
            $state.go('signup')
        }
    }
}

You can see it running here http://goo.gl/P5RsDU to check out put please press preview button

Change for forgetPassword function as shown below:

$scope.forgetPassword = function () {
   if($scope.user.username==Auth.username && $scope.user.password==Auth.password ){
                    $state.go('signup');
                    $scope.user.username = '';
                    $scope.user.password ='';
                }
            }