Can anyone assist me with this issue? I have a variable called $rootScope.user = {name:"abc",password:"asd"}. When a service response occurs, I am dynamically creating a rootscope variable by assigning it. How can I use ng-switch to check if the variable has a value (not null or undefined)?
<section ng-switch on="user">
<span ng-switch-when="null">{{user.name}}</span>
<span ng-switch-default>Hello</span>
</section>
Your help is much appreciated. Thank you.