I am working on setting the color of my input placeholder using a dynamic color defined in a $scope variable in my controller for my HTML code.
The $scope variable is structured as follows:
$scope.primaryColor={"color":colorVar}; //colorVar represents the color in hexadecimal
Since the color var has a dynamic value, I want to utilize ng-style on the input HTML tag to specify the color property for the placeholder inside the input field.
<input required name="email" ng-model="email" placeholder="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cca4a58cbba4adb8a9baa9bee2afa3a1">[email protected]</a>" ng-style="">
I understand that changing the placeholder color property through inline CSS is not possible. Is there a way for me to pass the color var to CSS using ng-style or any other methods?
If so, how can I achieve this?