How to show or hide a variable if null in AngularJs

To show or hide a variable if null in AngularJs, you can use the snippet below.

Sample AngularJs

<div ng-show="myVariable == null"></div>

or

<div ng-show="myvar != null"></div>

Please Share us:
Please rate this snippet

13 thoughts on “How to show or hide a variable if null in AngularJs

Leave a Reply