AngularJS - Binding radio buttons to models with boolean values

后端 未结 7 680
梦如初夏
梦如初夏 2020-12-02 06:30

I am having a problem binding radio buttons to an object whose properties have boolean values. I am trying to display exam questions retrieved from a $resource.

HTML

7条回答
  •  北海茫月
    2020-12-02 07:11

    The correct approach in Angularjs is to use ng-value for non-string values of models.

    Modify your code like this:

    
    

    Ref: Straight from the horse's mouth

提交回复
热议问题