var input=document.getElementById(some-id);
var input2= input.cloneNode(false);
input2.type='password';
input.parentNode.replaceChild(input2,input)
.controller('MyCtrl', function($scope) {
$scope.FromCtrl = 'love';
$scope.ChangeFromCtrl = function(){
$scope.FromCtrlt = 'pice';
}