Angular.js ng-switch ---testing if value is empty or undefined

前端 未结 3 2136
无人及你
无人及你 2021-02-12 11:48

In Angular.js templating, I need to test if a value is undefined or empty.... I am not sure how to do this since ng-switch-when tests for expressions in strings. I

3条回答
  •  梦毁少年i
    2021-02-12 12:02

    Following solution would also work (using angular 1.3.10):

    The string is not empty!
    The string is empty!

提交回复
热议问题