angular-moment icon indicating copy to clipboard operation
angular-moment copied to clipboard

Custom message when there is no value

Open niemyjski opened this issue 8 years ago • 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.

niemyjski avatar Feb 18 '16 15:02 niemyjski

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

medoix avatar Feb 24 '16 10:02 medoix

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.

niemyjski avatar Feb 24 '16 15:02 niemyjski