I am trying to learning angular JS and I am an absolute beginner.I tried using ng-if directives to print 'Mr or Mrs or Ms' according to the their gender and relationship status.When I bind the married model within the div tag it is giving out the correct value .But the binding after that prints true every time. Are there any other ways to check conditions ? Moreover I tried checking conditions with the controller , why doesn't that work? Please help!
<body ng-app="myApp" ng-controller="myFirstController" ng- init="first='';last='';gender='Male';married='true'">
<input type="text" data-ng-model="first">
<input type="text" data-ng-model="last">
<label for="gender">GENDER </label>
<input type="radio" name="gender" data-ng-model="gender" value="Male" /> MALE
<input type="radio" name="gender" data-ng-model="gender" value="Female" /> FEMALE
<br>
<br>
<div ng-if="gender==='Female'">
<input type="radio" name="married" data-ng-model="married" value="true" /> MARRIED
<input type="radio" name="married" data-ng-model="married" value="false" /> UNMARRIED
<br>
<br> {{married}}
</div>
<span ng-if="gender==='Male'">MR.</span>
<span ng-if="gender!=='Male'">
<span ng-if="married=='true'">MRS.</span>
<span ng-if="married=='false'">MS.</span> </span>{{first }} {{last}} {{married}}
<div ng-app="" ng-init="myCol='lightblue'">