I need to implement an input field (<input..>
) with a placeholder and title for tooltip that functions in the following way:
There is a variable called "myString" which can either be undefined/empty or contain a string. When empty, a default string should be displayed as the placeholder; otherwise, the value of "myString" should be shown.
I am working with AngularJS but I'm finding that ng-if does not offer an ideal solution (basically duplicating the same HTML and showing one based on the value of myString).
Appreciate any advice!