I tried the following ways to turn off the browser autocomplete.
1.added autocomplete="off",autocomplete="false" and autocomplete="new_password
" to form and input fields
<form autocomplete="off" name="cardForm" novalidate>
<div class="row form-group">
<label class="col-sm-2 control-label">Security Code</label>
<input type="password" class="form-control" id="securityCode" ng-model="add.ccInfo.Securitycode" name="Security" autocomplete="off">
</div>
2. And also tried with adding hidden input fields in front of password fields like this
<input type="hidden" name="Security" >
<input type="password" class="form-control" id="securityCode" ng-
model="add.ccInfo.Securitycode" name="Security" autocomplete="off">
3.and also tried changing type of input field from text
to password
on
getting focus to input field
<form autocomplete="off" name="cardForm" novalidate>
<div class="row form-group">
<label class="col-sm-2 control-label">Security Code</label>
<input type="password" class="form-control" id="securityCode" data-ng-focus="add.changeType()" id="securityCode" ng-model="add.ccInfo.Securitycode" name="Security" autocomplete="false">
</div>
and js part
add.changeType = function () {
var el = angular.element(document.querySelector('#securityCode'));
el.attr("type", "password")
}
its disable auto complete first time loads and if i click in the field it shows a list with saved passwords .how can i avoid that
img here