Angular2 - Show/Hide section on selection of radio button

后端 未结 2 1776
醉酒成梦
醉酒成梦 2021-02-19 22:56

I have to show or hide sections based on selection of radio button

 

        
2条回答
  •  野的像风
    2021-02-19 23:28

    In Angular it can be achieved with *ngIf:

      Yes
    
      No
    
     

    Supply

    Demand

    And no need to check if option==true or false, [checked]="options" and [checked]="!options" do the same.

提交回复
热议问题