There are two ways to achieve the desired effect.
- Using
ng-if - Use
ng-showorng-hide
, ng-if / DOM Boolean, true false.
, ng-show , . , DOM .
ng-if, DOM. , , web-inpsector, ng-show.
Edited. . http://plnkr.co/edit/JB4LAgo9rqtPnPZHpwWr?p=preview
<label><input type="radio" value="unForgotten" ng-model="dataForgotten"/> Forgot username</label>
<br/>
<label><input type="radio" value="pwForgotten" ng-model="dataForgotten"/>Forgot password</label>
<br/>
<label><input type="radio" value="bothForgotten" ng-model="dataForgotten"/>Forgot both username and pw</label>
<div ng-if="dataForgotten == 'unForgotten'">
Username Forgotten
</div>
<div ng-if="dataForgotten == 'pwForgotten'">
Password Forgotten
</div>
<div ng-if="dataForgotten == 'bothForgotten'">
Both Forgotten
</div>
ng-if
https://docs.angularjs.org/api/ng/directive/ngIf
ng-show https://docs.angularjs.org/api/ng/directive/ngShow