How to align the radio buttons horizontally in angular material?

前端 未结 1 630
温柔的废话
温柔的废话 2021-02-11 13:11

I was expecting a in-built directive or a tag for this but probably not according to their documentation.

This is the example.

相关标签:
1条回答
  • 2021-02-11 13:32

    You do not need to override any default CSS:

    <md-radio-group layout="row">
      <md-radio-button value=0 class="md-primary">On</md-radio-button>
      <md-radio-button value=1> Off </md-radio-button>
    </md-radio-group>
    

    Just put in md-radio-group tag a layout="row" attribute.

    0 讨论(0)
提交回复
热议问题