You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a string filter that replaces a null or empty string with a desired input. For example:
<p>{{ "" | replaceIfBlank:"N/A" }}</p>
<!--result: <p>N/A</p>-->
<h2>{{ null | replaceIfBlank:"Title not given" }}</h2>
<!--result: <n2>Title not given</h2>-->
Happy to build this myself and contribute via a PR, if it sounds useful and isn't already included here or in the native Angular filters (but just being overlooked by me).
The text was updated successfully, but these errors were encountered:
mikecarroll
changed the title
Add an replaceIfBlank string filter?
Add replaceIfBlank string filter?
Nov 29, 2014
I'm looking for a string filter that replaces a
null
or empty string with a desired input. For example:Happy to build this myself and contribute via a PR, if it sounds useful and isn't already included here or in the native Angular filters (but just being overlooked by me).
The text was updated successfully, but these errors were encountered: