In this example last name textbox will be created if ng-if
expression evaluates true i.e first name textbox neither be null nor empty. In our example, we have two textboxes one with ng-model
="firstName" and second with ng-model
="lastName", but there is span outside lastname textbox with ng-if
="firstName!=null && firstName!=''" so if there will be any value in first textbox only then the second textbox will be visible.