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>

12 thought on “How to show or hide a variable if null in AngularJs”

Leave a Reply