urish/angular-moment

Custom message when there is no value

Opened this issue · 2 comments

Is there a way to put a default value if the time value is null or undefined. Example if I pass null or 0 as a time interval for time ago. I want to display Never.

Is that not more an angular question? (Sorry just here for a separate issue and saw this).

You can use ng-if / ng-hide / ng-show for examples see this SO https://stackoverflow.com/questions/15810278/if-else-statement-in-angularjs-templates

guess I could, but it's kind of a pain to do so, especially when you don't know if the value being parsed by this control is valid or not.