I'm facing some issues with my angularjs application. I am trying to implement a custom directive to easily translate my app. While it works fine on text fields, the same directive doesn't seem to work on input fields for changing the placeholder.
Just to provide some clarity, below is a snippet of the code:
http://plnkr.co/edit/GUS2FYCxA6wAOtkoxG66
$scope.validform = function() {
console.log($scope.valuefield);
};
Upon clicking the button, I notice that the input model "valuefield" shows as "undefined". However, I expect to see the value displayed in the input field. What baffles me is that while the directive successfully changes the placeholder, it does not affect the model.
I believe I may need to define the scope of the directive more specifically, or perhaps utilize the $watch function, though I am unsure how to proceed with either approach.
Any guidance on this issue would be greatly appreciated.