How to make a formControl readonly

后端 未结 6 541
死守一世寂寞
死守一世寂寞 2020-12-15 03:24

How to make a formControl in angular readonly

I know i can do it in html like


         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 03:35

    We can use any html attribute and bind it in angular using [].

    So,you can use attribute binding for the attribute readonly in that control

    e.g

提交回复
热议问题