Ionic / Angular : unable to disable password input auto complete

I'm designing an app using Ionic Framework / Angular / Cordova and have issues clearing old form values.

When a user logs in, he's routed to another view but when they switch back to the login view (after disconnecting), the login & password fields are still filled with old values.

So I know this question was asked many times here and the main solution is to set input attribute:

autocomplete="off"

But this has no effect. I also added

document.getElementById('password').value = '';

in the login controller with no change.

How can I clear this values?

use autocomplete in js and put this line:

 someFormElm.setAttribute( "autocomplete", "off" );

EX:

<input type="text" name="fieldName" id="fieldId" class="firstCSSClass otherCSSClass autocompleteOff" />

JS:

$(document).ready(function(){$("input").attr("autocomplete","off");});