I have a requirement that when clicking an element(Button) should change another element property. I can do by jquery. But i want to ignore the jquery in my angular project.
In Html,
<input type=password />
<button ngclick="changeToTxt()">Change type password to text</button>
In controller,
app.controller('loginPage', function ($scope) {
$scope.changeToTxt = function () {
**// need to get the password element and need to change type = text.....**
}
});
Is there a way(or different/best way) by doing in controller? or need to write a directive for this?